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

What is the purpose of random sessionToken in the User entity? #6

Closed
YogeshUmeshVaity opened this issue Dec 10, 2021 · 3 comments
Closed

Comments

@YogeshUmeshVaity
Copy link

YogeshUmeshVaity commented Dec 10, 2021

Hi, you have done a great job with this project! I was just going through the code and was wondering what must be the purpose of sessionToken in the User entity. Do you mind explaining it a bit? It looks like it is a random string concantenated to the secret while generating the refreshToken and accessToken. What if we don't use it?

@DenzelCode
Copy link
Owner

Thank you very much!

The purpose of the sessionToken is when you are logged in on different devices and you change your password it gives you the option to log out from all your other devices, if you want to sign off from all of the other devices, it changes your session token.

async logoutFromAllDevices(@CurrentUser() user: User) {

image

@DenzelCode DenzelCode pinned this issue Dec 11, 2021
@YogeshUmeshVaity
Copy link
Author

@DenzelCode Thank you!

@DenzelCode
Copy link
Owner

@YogeshUmeshVaity You are welcome.

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