diff --git a/src/App/Pages/Accounts/LoginSsoPageViewModel.cs b/src/App/Pages/Accounts/LoginSsoPageViewModel.cs index 5a1eac876..319992292 100644 --- a/src/App/Pages/Accounts/LoginSsoPageViewModel.cs +++ b/src/App/Pages/Accounts/LoginSsoPageViewModel.cs @@ -139,7 +139,7 @@ namespace Bit.App.Pages var code = GetResultCode(authResult, state); if (!string.IsNullOrEmpty(code)) { - await LogIn(code, codeVerifier, redirectUri); + await LogIn(code, codeVerifier, redirectUri, OrgIdentifier); } else { @@ -164,11 +164,11 @@ namespace Bit.App.Pages return code; } - private async Task LogIn(string code, string codeVerifier, string redirectUri) + private async Task LogIn(string code, string codeVerifier, string redirectUri, string orgId) { try { - var response = await _authService.LogInSsoAsync(code, codeVerifier, redirectUri); + var response = await _authService.LogInSsoAsync(code, codeVerifier, redirectUri, orgId); await AppHelpers.ResetInvalidUnlockAttemptsAsync(); if (RememberOrgIdentifier) { diff --git a/src/Core/Abstractions/IAuthService.cs b/src/Core/Abstractions/IAuthService.cs index 4cd9fbf51..a46cedd9d 100644 --- a/src/Core/Abstractions/IAuthService.cs +++ b/src/Core/Abstractions/IAuthService.cs @@ -22,7 +22,7 @@ namespace Bit.Core.Abstractions bool AuthingWithPassword(); List GetSupportedTwoFactorProviders(); Task LogInAsync(string email, string masterPassword, string captchaToken); - Task LogInSsoAsync(string code, string codeVerifier, string redirectUrl); + Task LogInSsoAsync(string code, string codeVerifier, string redirectUrl, string orgId); Task LogInCompleteAsync(string email, string masterPassword, TwoFactorProviderType twoFactorProvider, string twoFactorToken, bool? remember = null); Task LogInTwoFactorAsync(TwoFactorProviderType twoFactorProvider, string twoFactorToken, bool? remember = null); void LogOut(Action callback); diff --git a/src/Core/Services/AuthService.cs b/src/Core/Services/AuthService.cs index 175956d08..02b06475f 100644 --- a/src/Core/Services/AuthService.cs +++ b/src/Core/Services/AuthService.cs @@ -136,10 +136,10 @@ namespace Bit.Core.Services null, captchaToken); } - public async Task LogInSsoAsync(string code, string codeVerifier, string redirectUrl) + public async Task LogInSsoAsync(string code, string codeVerifier, string redirectUrl, string orgId) { SelectedTwoFactorProviderType = null; - return await LogInHelperAsync(null, null, null, code, codeVerifier, redirectUrl, null, null, null, null); + return await LogInHelperAsync(null, null, null, code, codeVerifier, redirectUrl, null, orgId: orgId); } public Task LogInTwoFactorAsync(TwoFactorProviderType twoFactorProvider, string twoFactorToken,