MobileServiceClient.LoginAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
abstract member LoginAsync : Microsoft.WindowsAzure.MobileServices.MobileServiceAuthenticationProvider * Newtonsoft.Json.Linq.JObject -> System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser>
override this.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
Task that will complete when the user has finished authentication.
Implements
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 optional 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>
override this.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
- 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.
Implements
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
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기