Skip to content

chore: Extend JWT to store User Id & refactoring - #76

Merged
SujithThirumalaisamy merged 2 commits into
code100x:mainfrom
thepradipvc:extending-jwt
Sep 10, 2024
Merged

SujithThirumalaisamy merged 2 commits into
code100x:mainfrom
thepradipvc:extending-jwt

Conversation

@thepradipvc

Copy link
Copy Markdown
Contributor

This PR does the following

  1. Adds User ID to the JWT token reducing db calls.
  2. Moved redirection logic on pages to server-side reducing the round trip of redirect from browser using hooks.
  3. Refactored codebase to separate main page route files (page.tsx within /app) from others like lib & components to reduce confusion in routing.

refactored to separate pages & others

NOTE: Adding a User ID to JWT takes place when the user signs in so change the NEXTAUTH_SECRET to make the older JWTs invalid as they don't contain a User ID.

…alls & separate route file from others like lib & components
@SujithThirumalaisamy

Copy link
Copy Markdown
Contributor

LGTM, Can you please add the prisma singleton client here

@thepradipvc

Copy link
Copy Markdown
Contributor Author

Hey @SujithThirumalaisamy
I added the Prisma singleton client

@SujithThirumalaisamy

Copy link
Copy Markdown
Contributor

Thankyou sir!

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

Successfully merging this pull request may close these issues.

2 participants