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

Discuss possibly saving authorization tokens in database #3

Open
spookybear0 opened this issue Feb 11, 2022 · 5 comments
Open

Discuss possibly saving authorization tokens in database #3

spookybear0 opened this issue Feb 11, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@spookybear0
Copy link
Member

spookybear0 commented Feb 11, 2022

Pros:

  • Not having to log in every time the client is opened (alternative would be saving the hashed credentials and getting a new token every time the game is opened)
  • Persisting throughout server restarts
  • Static token

Cons:

  • Slower authentication
  • Possible security risk of using static tokens

How do you guys feel about this being implemented? @lotus-gd/backend

@RealistikDash
Copy link
Member

We could make the tokens expire after a specific time period, addressing the security concerns of a static token. This is something similar most oauth implementations use, where the client is required to obtain/refresh a token at regular time intervals.

@spookybear0
Copy link
Member Author

Yes, that's a good idea, what time intervals do you think would work.

@RealistikDash
Copy link
Member

Anything within the range of 24-72hrs should work

@spookybear0
Copy link
Member Author

Will work on saving tokens in db now.

@spookybear0 spookybear0 added the enhancement New feature or request label Feb 12, 2022
@RealistikDash
Copy link
Member

Yknow, with about 4 months of more knowledge, using redis for the storage of any session details would be great. Redis itself by nature is really fast and can even manage expiration for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants