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

Allow storing information in the JWT #25

Open
xixixao opened this issue Jul 10, 2024 · 1 comment
Open

Allow storing information in the JWT #25

xixixao opened this issue Jul 10, 2024 · 1 comment
Labels
enhancement New feature or request major needs feedback Looking for more justification via real-world use cases

Comments

@xixixao
Copy link
Contributor

xixixao commented Jul 10, 2024

Some people might be more familiar with retrieving information from the JWT instead of from the DB. The client would provide the equivalent of Clerk's useUser hook, and on the backend await ctx.auth.getUserIdentity() could be used.

@xixixao xixixao added enhancement New feature or request major needs feedback Looking for more justification via real-world use cases labels Jul 10, 2024
@cmaycumber
Copy link

This seems import for routing for middleware on NextJS apps as well. Being able to retrieve info from the JWT like an org role would be helpful for determining if a user could visit an admin route before hitting the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request major needs feedback Looking for more justification via real-world use cases
Projects
None yet
Development

No branches or pull requests

2 participants