1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

Handle nameID as email w/o email attribute (#938)

This commit is contained in:
Chad Scharf 2020-09-15 12:50:25 -04:00 committed by GitHub
parent 1c6c599b8d
commit 143e34766d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,6 +351,10 @@ namespace Bit.Sso.Controllers
{
var name = GetName(claims);
var email = GetEmailAddress(claims);
if (string.IsNullOrWhiteSpace(email) && providerUserId.Contains("@"))
{
email = providerUserId;
}
Guid? orgId = null;
if (Guid.TryParse(provider, out var oId))