1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

[PM-3551] Expired SSO token cached (#2718)

This commit is contained in:
André Bispo
2023-09-08 07:48:37 +01:00
committed by GitHub
parent 9026dd10e5
commit 5961a001ab

View File

@@ -34,6 +34,7 @@ namespace Bit.App.Pages
private readonly ICryptoService _cryptoService;
private string _orgIdentifier;
private bool _useEphemeralWebBrowserSession;
public LoginSsoPageViewModel()
{
@@ -145,9 +146,12 @@ namespace Bit.App.Pages
"ssoToken=" + Uri.EscapeDataString(ssoToken);
WebAuthenticatorResult authResult = null;
authResult = await WebAuthenticator.AuthenticateAsync(new Uri(url),
new Uri(REDIRECT_URI));
authResult = await WebAuthenticator.AuthenticateAsync(new WebAuthenticatorOptions()
{
CallbackUrl = new Uri(REDIRECT_URI),
Url = new Uri(url),
PrefersEphemeralWebBrowserSession = _useEphemeralWebBrowserSession,
});
var code = GetResultCode(authResult, state);
if (!string.IsNullOrEmpty(code))
@@ -172,6 +176,8 @@ namespace Bit.App.Pages
{
// user canceled
await _deviceActionService.HideLoadingAsync();
// Workaroung for cached expired sso token PM-3551
_useEphemeralWebBrowserSession = true;
}
catch (Exception ex)
{