1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-10-02 04:37:50 +02: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
{