Skip to content

Commit 83f6f5b

Browse files
kinosangkevinchalet
authored andcommitted
Fix Weibo email scope detection
1 parent a08d85e commit 83f6f5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AspNet.Security.OAuth.Weibo/WeiboAuthenticationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync([NotNull]
6868
// When the email address is not public, retrieve it from
6969
// the emails endpoint if the user:email scope is specified.
7070
if (!string.IsNullOrEmpty(Options.UserEmailsEndpoint) &&
71-
!identity.HasClaim(claim => claim.Type == ClaimTypes.Email) && Options.Scope.Contains("user:email"))
71+
!identity.HasClaim(claim => claim.Type == ClaimTypes.Email) && Options.Scope.Contains("email"))
7272
{
7373
identity.AddOptionalClaim(ClaimTypes.Email, await GetEmailAsync(tokens), Options.ClaimsIssuer);
7474
}

0 commit comments

Comments
 (0)