SpoonX / aurelia-authentication

Authentication plugin for aurelia.
http://aurelia-authentication.spoonx.org
MIT License
90 stars 60 forks source link

If I have the same app open in two different Browser, and log out in one, the other also logs out #381

Closed gregoryagu closed 6 years ago

gregoryagu commented 6 years ago

I have a Task Management App.

Sometimes I need to be logged into two different accounts at the same time.

But when I open the app in another tab and log in, the other tab also logs in under the new user.

I don't see how one tab is affecting the other tab - it seems like they should be operating in their own context.

RWOverdijk commented 6 years ago

Hello @gregoryagu this is because the keys are stored in localstorage. This is not an issue, it's by design. To implement support for multiple accounts, you'll need multiple instances operating using different keys. The main key you're looking for then is storageKey. You can find all the options here:

https://aurelia-authentication.spoonx.org/baseConfig.html