docs/en/modules/identity/oauth-login.md
//[doc-seo]
{
"Description": "Learn how to enable OAuth Resource Owner Password authentication for external logins in the ABP Framework's Identity PRO module."
}
You must have an ABP Team or a higher license to use this module & its features.
The Identity PRO module has built-in OAuthExternalLoginProvider service. It implements OAuth Resource Owner Password authentication and gets user info for external login.
You need to enable the OAuth login feature and configure related settings.
Then you can enter the user name and password on the login page for oauth external login.
AbpOAuthExternalLoginProviderOptions maps claims returned by the user-info endpoint to the imported or updated Identity user. The defaults use ABP claim types for name, surname, email, email verification, phone number, phone verification and user id. Configure the mappings when the provider returns different claim names:
Configure<AbpOAuthExternalLoginProviderOptions>(options =>
{
options.NameClaimType = "given_name";
options.SurnameClaimType = "family_name";
options.EmailClaimType = "email";
options.EmailConfirmedClaimType = "email_verified";
options.PhoneNumberClaimType = "phone_number";
options.PhoneNumberConfirmedClaimType = "phone_number_verified";
options.ProviderKeyClaimType = "sub";
});
The email claim is required. Other mapped claims are optional. CanObtainUserInfoWithoutPassword defaults to false.