Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change token storage from session storage to other solutions. #174

Open
barrymichaeldoyle opened this issue Aug 4, 2020 · 1 comment

Comments

@barrymichaeldoyle
Copy link

Hi there,

A bit of a feature request. As far as I can tell, the storage mechanism for this package makes use of session storage for storing token and user data.

My employer has asked me if I could make authentication persist across tabs. Would it be possible to implement something that will help make this request possible?

@ml-devninja
Copy link

ml-devninja commented Aug 12, 2020

import { UserManagerSettings, WebStorageStateStore } from 'oidc-client';

const userManagerConfig: UserManagerSettings = {
   ...YOUR_CONFIG
    userStore: new WebStorageStateStore({ store: window.localStorage })
};

all info you can find here: https://github.com/IdentityModel/oidc-client-js/wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants