Store oidc tokens in localStorage instead of sessionStorage
Use of `sessionStorage` makes user experience extremely hostile, as separate tabs in a browser do not share the session. In addition to that, opening a new tab happens to initiate complete IdP signout if another signed in tab is open. None of these problems appear if `localStorage` is used. Original author clearly had an idea to implement this, but for whatever reason kept this line commented out. Maybe because `WebStorageStateStore` type needs to be qualified with `oidc.`?
This commit is contained in:
parent
210a685313
commit
49559d1814
|
|
@ -88,7 +88,7 @@ function auth_settings_apply_defaults(authSettings) {
|
|||
|
||||
function oauth_initialize_user_manager(resource_server) {
|
||||
oidcSettings = {
|
||||
//userStore: new WebStorageStateStore({ store: window.localStorage }),
|
||||
userStore: new oidc.WebStorageStateStore({ store: window.localStorage }),
|
||||
authority: resource_server.oauth_provider_url,
|
||||
client_id: resource_server.oauth_client_id,
|
||||
response_type: resource_server.oauth_response_type,
|
||||
|
|
|
|||
Loading…
Reference in New Issue