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

Implement auth #37

Closed
lutzzdias opened this issue Oct 26, 2023 · 1 comment · Fixed by #42
Closed

Implement auth #37

lutzzdias opened this issue Oct 26, 2023 · 1 comment · Fixed by #42
Assignees
Labels
feature A new feature server Related to the server

Comments

@lutzzdias
Copy link
Owner

Change password /forgot password should actually be implemented within this issue and not in #36

This issue should also handle the sign in, register and logout.

Auth operations will be based on the session logic, not JWT, because it is much simpler and more secure. I'll probably use Redis for the sessions storage, however it is not yet decided.

I'll store only the user id in Redis, and the client will receive only the session id, keeping overhead to a minimum. Expiry length for each session is still not decided.

@lutzzdias lutzzdias added server Related to the server feature A new feature labels Oct 26, 2023
@lutzzdias lutzzdias moved this to In progress in ArtiSync Nov 6, 2023
@lutzzdias
Copy link
Owner Author

After searching about implementations of session based login with nestJS, I found that there is currently an issue related to cache management within nest. Basically, nest cache solutions do not work with the newest version of redis.

Because of that, and the huge amount of information on JWT, I will actually implement the auth flow using JWT. This may be refactored in the future, but it is not certain. Both authentication methods have their own pros and cons.

The biggest issue with JWT is expiring a token after it's security has been compromised. However, taking into account that most users do not know what JWT is, the information within ArtiSync will not be anything super essential and the likelihood of this drawback actually affecting someone being really small, I've decided to implement the JWT auth.

@lutzzdias lutzzdias self-assigned this Nov 8, 2023
lutzzdias added a commit that referenced this issue Nov 8, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in ArtiSync Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature server Related to the server
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

1 participant