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

Only allows one user to be logged in #6

Open
Yamaha32088 opened this issue May 13, 2020 · 1 comment
Open

Only allows one user to be logged in #6

Yamaha32088 opened this issue May 13, 2020 · 1 comment

Comments

@Yamaha32088
Copy link

I appreciate all the work that went into this and the tutorial it was very insightful. I think currently though with the code implementation in this repo it will not allow for multiple different people to be logged in. Inside of auth.js you set inMemoryToken but it is shared across all users. For example if I start the app in development mode and login it will set inMemoryToken just fine. Now if I open another Browser in incognito it thinks I am still logged in as the other user because inMemoryToken already exists.

Do you know of a workaround for this?

@Yamaha32088
Copy link
Author

It appears that it may be caused by the way node is caching the module on the very first request. Node is retrieving the tokens properly and storing them inside inMemoryToken as expected but then this gets cached and reused on every subsequent request to node. The client side works as expected but the server side does not.

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

1 participant