MobileServiceClient.LoginAsync
Method
Definition
Overloads
| LoginAsync(MobileServiceAuthenticationProvider, JObject) |
Logs a user into a Windows Azure Mobile Service with the provider and optional token object. |
| LoginAsync(String, JObject) |
Logs a user into a Microsoft Azure Mobile Service with the provider and optional token object. |
LoginAsync(MobileServiceAuthenticationProvider, JObject)
Logs a user into a Windows Azure Mobile Service with the provider and optional token object.
public System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser> LoginAsync (Microsoft.WindowsAzure.MobileServices.MobileServiceAuthenticationProvider provider, Newtonsoft.Json.Linq.JObject token);
- provider
- MobileServiceAuthenticationProvider
Authentication provider to use.
- token
- Newtonsoft.Json.Linq.JObject
Provider specific object with existing OAuth token to log in with.
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 optional token object.
public System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser> LoginAsync (string provider, Newtonsoft.Json.Linq.JObject token);
- provider
- String
Authentication provider to use.
- token
- Newtonsoft.Json.Linq.JObject
Provider specific object with existing OAuth token to log in with.
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>"}