diff --git a/bitwarden_license/src/Sso/Controllers/AccountController.cs b/bitwarden_license/src/Sso/Controllers/AccountController.cs index 1f691a601..83c392779 100644 --- a/bitwarden_license/src/Sso/Controllers/AccountController.cs +++ b/bitwarden_license/src/Sso/Controllers/AccountController.cs @@ -447,6 +447,12 @@ namespace Bit.Sso.Controllers // All Existing User flows handled below if (existingUser != null) { + if (existingUser.UsesKeyConnector && orgUser == null || + orgUser.Status == OrganizationUserStatusType.Invited) + { + throw new Exception(_i18nService.T("UserAlreadyExistsKeyConnector")); + } + if (orgUser == null) { // Org User is not created - no invite has been sent diff --git a/bitwarden_license/src/Sso/Views/Shared/Error.cshtml b/bitwarden_license/src/Sso/Views/Shared/Error.cshtml index 6bd879fe3..cdce82948 100644 --- a/bitwarden_license/src/Sso/Views/Shared/Error.cshtml +++ b/bitwarden_license/src/Sso/Views/Shared/Error.cshtml @@ -7,11 +7,15 @@

@i18nService.T("Error")@(string.IsNullOrWhiteSpace(Model?.Message) ? null : $": {Model.Message}")

@if (!string.IsNullOrWhiteSpace(Model?.RedirectUri)) { -

@Html.Raw(i18nService.T("SsoErrorWithRedirect", Model?.RedirectUri)) @Model?.Description

+

@Html.Raw(i18nService.T("SsoErrorWithRedirect", Model?.RedirectUri))

} else { -

@i18nService.T("SsoError") @Model?.Description

+

@i18nService.T("SsoError")

+} +@if (!string.IsNullOrWhiteSpace(Model?.Description)) +{ +

@Model?.Description

} @if (!string.IsNullOrWhiteSpace(Model?.RequestId)) { diff --git a/src/Core/Resources/SharedResources.en.resx b/src/Core/Resources/SharedResources.en.resx index 57f09f5a9..af0c6a109 100644 --- a/src/Core/Resources/SharedResources.en.resx +++ b/src/Core/Resources/SharedResources.en.resx @@ -434,10 +434,10 @@ Error - There was an unexpected error during single sign-on. Please close this page and try again. + There was an unexpected error during single sign-on. - There was an unexpected error during single sign-on. Please go back to <a href="{0}">{0}</a> or close this page and try again. + There was an unexpected error during single sign-on. Please go back to <a href="{0}">{0}</a>. Request ID @@ -533,7 +533,10 @@ User, '{0}', has already been invited to this organization, '{1}'. Accept the invite in order to log in with SSO. - In order to join this organization, contact an admin to send you an invite and follow the instructions within to accept. + You were removed from the organization managing single sign-on for your account. Contact the organization administrator for help regaining access to your account. + + + You were removed from the organization managing single sign-on for your account. Create a new account to continue using Bitwarden. Redirect GET