IMobileServiceClient.LoginAsync Method

Definition

Overloads

LoginAsync(MobileServiceAuthenticationProvider, JObject)

Logs a user into a Windows Azure Mobile Service with the provider and a token object.

LoginAsync(String, JObject)

Logs a user into a Microsoft Azure Mobile Service with the provider and a token object.

LoginAsync(MobileServiceAuthenticationProvider, JObject)

Logs a user into a Windows Azure Mobile Service with the provider and a token object.

public System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser> LoginAsync (Microsoft.WindowsAzure.MobileServices.MobileServiceAuthenticationProvider provider, Newtonsoft.Json.Linq.JObject token);
abstract member LoginAsync : Microsoft.WindowsAzure.MobileServices.MobileServiceAuthenticationProvider * Newtonsoft.Json.Linq.JObject -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser>
Public Function LoginAsync (provider As MobileServiceAuthenticationProvider, token As JObject) As Task(Of MobileServiceUser)

Parameters

provider
MobileServiceAuthenticationProvider

Authentication provider to use.

token
Newtonsoft.Json.Linq.JObject

Provider specific object with existing OAuth token to log in with.

Returns

System.Threading.Tasks.Task<MobileServiceUser>

Task that will complete when the user has finished authentication.

Remarks

The token object needs to be formatted depending on the specific provider. These are some examples of formats based on the providers:

  • MicrosoftAccount{"authenticationToken":"<the_authentication_token>"}
  • Facebook{"access_token":"<the_access_token>"}
  • Google{"access_token":"<the_access_token>"}

Applies to

LoginAsync(String, JObject)

Logs a user into a Microsoft Azure Mobile Service with the provider and a token object.

public System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser> LoginAsync (string provider, Newtonsoft.Json.Linq.JObject token);
abstract member LoginAsync : string * Newtonsoft.Json.Linq.JObject -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser>
Public Function LoginAsync (provider As String, token As JObject) As Task(Of MobileServiceUser)

Parameters

provider
System.String

Authentication provider to use.

token
Newtonsoft.Json.Linq.JObject

Provider specific object with existing OAuth token to log in with.

Returns

System.Threading.Tasks.Task<MobileServiceUser>

Task that will complete when the user has finished authentication.

Remarks

The token object needs to be formatted depending on the specific provider. These are some examples of formats based on the providers:

  • MicrosoftAccount{"authenticationToken":"<the_authentication_token>"}
  • Facebook{"access_token":"<the_access_token>"}
  • Google{"access_token":"<the_access_token>"}

Applies to