Login Method

OAuthWebSecurity.Login Method

Logs the user in.

Namespace:  Microsoft.Web.WebPages.OAuth
Assembly:  Microsoft.Web.WebPages.OAuth (in Microsoft.Web.WebPages.OAuth.dll)

public static bool Login(
	string providerName,
	string providerUserId,
	bool createPersistentCookie
)

Parameters

providerName
Type: System.String
The provider name.
providerUserId
Type: System.String
The user ID for the specified provider.
createPersistentCookie
Type: System.Boolean
true to create a persistent cookie so that the login information is saved across browser sessions; otherwise, false.

Return Value

Type: System.Boolean
true if login was successful; otherwise, false.

For an example of using the OAuthWebSecurity class, see Using OAuth Providers with MVC 4.

Show:
© 2016 Microsoft