From 143e34766d3936087a48723c9d7bf2f12e50a3a5 Mon Sep 17 00:00:00 2001 From: Chad Scharf <3904944+cscharf@users.noreply.github.com> Date: Tue, 15 Sep 2020 12:50:25 -0400 Subject: [PATCH] Handle nameID as email w/o email attribute (#938) --- bitwarden_license/src/Sso/Controllers/AccountController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitwarden_license/src/Sso/Controllers/AccountController.cs b/bitwarden_license/src/Sso/Controllers/AccountController.cs index dd095f311e..457298c8c8 100644 --- a/bitwarden_license/src/Sso/Controllers/AccountController.cs +++ b/bitwarden_license/src/Sso/Controllers/AccountController.cs @@ -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))