-
Notifications
You must be signed in to change notification settings - Fork 169
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
NOT DONE [Auth FE] AASignedInUser I generate a JWT which contains my userId #181
Closed
5 tasks done
Milestone
Comments
mattzcarey
changed the title
[Auth FE] AAUser I am generated a JWT which contains my userId
[Auth FE] AAUser I generate a JWT which contains my userId
Aug 15, 2023
mattzcarey
changed the title
[Auth FE] AAUser I generate a JWT which contains my userId
[Auth FE] AASignedInUser I generate a JWT which contains my userId
Aug 15, 2023
ChristianN1234
moved this from Sprint Backlog
to Daily goals
in Code Review GPT Roadmap
Aug 22, 2023
Merged
SEBRATHEZEBRA
moved this from Code Review
to Functional Review
in Code Review GPT Roadmap
Aug 30, 2023
Back from validation. This ticket never created the jwt. |
3 tasks
mattzcarey
changed the title
[Auth FE] AASignedInUser I generate a JWT which contains my userId
NOT DONE [Auth FE] AASignedInUser I generate a JWT which contains my userId
Sep 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
We need to secure our APIs. This means we will have to use jwt tokens at some point to authenticate them.
dependent on #178
Current plan is to use a jwt token from next-auth in combination with the database adapter to store users. The flow looks like this:
Use JWT with NextAuth:
When a user logs in via NextAuth, generate a JWT that contains the user's unique identifier (like a user ID). This JWT should be signed using a secure secret key. This will need to be added to the next-auth config.
Securely Store Secret Key:
Store the secret key used to sign the JWT securely with SST in the secret config.
Make Requests to API Gateway with JWT:
When making requests to the API Gateway, include the JWT as an Authorization header, typically as a Bearer token.
eg.
Authorization: Bearer <token>
Validation Steps:
When I sign in I am generated a jwt token which is stored in a cookie
Screenshot of this decoded token in the backend lambda getUser
Tech Steps:
The text was updated successfully, but these errors were encountered: