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);
Parameters
provider
MobileServiceAuthenticationProvider

Authentication provider to use.

token
Newtonsoft.Json.Linq.JObject

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

Returns

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>"}

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);
Parameters
provider
String

Authentication provider to use.

token
Newtonsoft.Json.Linq.JObject

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

Returns

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>"}