mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 00:03:22 +00:00
[PM-3551] Expired SSO token cached (#2718)
This commit is contained in:
@@ -34,6 +34,7 @@ namespace Bit.App.Pages
|
|||||||
private readonly ICryptoService _cryptoService;
|
private readonly ICryptoService _cryptoService;
|
||||||
|
|
||||||
private string _orgIdentifier;
|
private string _orgIdentifier;
|
||||||
|
private bool _useEphemeralWebBrowserSession;
|
||||||
|
|
||||||
public LoginSsoPageViewModel()
|
public LoginSsoPageViewModel()
|
||||||
{
|
{
|
||||||
@@ -145,9 +146,12 @@ namespace Bit.App.Pages
|
|||||||
"ssoToken=" + Uri.EscapeDataString(ssoToken);
|
"ssoToken=" + Uri.EscapeDataString(ssoToken);
|
||||||
|
|
||||||
WebAuthenticatorResult authResult = null;
|
WebAuthenticatorResult authResult = null;
|
||||||
|
authResult = await WebAuthenticator.AuthenticateAsync(new WebAuthenticatorOptions()
|
||||||
authResult = await WebAuthenticator.AuthenticateAsync(new Uri(url),
|
{
|
||||||
new Uri(REDIRECT_URI));
|
CallbackUrl = new Uri(REDIRECT_URI),
|
||||||
|
Url = new Uri(url),
|
||||||
|
PrefersEphemeralWebBrowserSession = _useEphemeralWebBrowserSession,
|
||||||
|
});
|
||||||
|
|
||||||
var code = GetResultCode(authResult, state);
|
var code = GetResultCode(authResult, state);
|
||||||
if (!string.IsNullOrEmpty(code))
|
if (!string.IsNullOrEmpty(code))
|
||||||
@@ -172,6 +176,8 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
// user canceled
|
// user canceled
|
||||||
await _deviceActionService.HideLoadingAsync();
|
await _deviceActionService.HideLoadingAsync();
|
||||||
|
// Workaroung for cached expired sso token PM-3551
|
||||||
|
_useEphemeralWebBrowserSession = true;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user