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

user sign-in tutorial #425

Open
mybigman opened this issue Oct 19, 2024 · 0 comments
Open

user sign-in tutorial #425

mybigman opened this issue Oct 19, 2024 · 0 comments

Comments

@mybigman
Copy link

mybigman commented Oct 19, 2024

What is the type of issue?

Documentation is incorrect, Example code is not working

What is the issue?

3. In /sign-in we insert a username and hashed password with argon2id
4. In /sign-up we does the following:

    4.1 We check if user exists and verify the password
    4.2 If the password matches, then we generate a new session into session
    4.3 We set cookie token with the value of session
    4.4 We append secret to cookie to add hash attacker from tampering with the cookie

3 and 4 should be switched.

3. In /sign-up ...
4. In /sign-in ...

Also the sign-in does not work in user.ts as it is expecting the cookie when it should only be setting the cookie after successful sign-in.

Where did you find it?

https://elysiajs.com/tutorial.html

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