create session if refresh did not succeed

Signed-off-by: Gasan Guseinov <gasan.guseinov@ing.com>
This commit is contained in:
Gasan Guseinov
2024-11-28 11:19:30 +01:00
committed by Gasan.Guseinov
parent 2f56fd30e8
commit 979cf5d7d8
@@ -83,10 +83,7 @@ export class RefreshingAuthSessionManager<T> implements SessionManager<T> {
}
return refreshedSession;
} catch (error) {
if (options.optional) {
return undefined;
}
throw error;
// If the refresh attempt fails we assume we don't have a session, so continue to create one.
}
}