Skip to content

user sign-in tutorial #425

@mybigman

Description

@mybigman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions