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 changing/enhancing the session object in a afterLogin callback or similar. #140

Open
happylinks opened this issue Nov 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@happylinks
Copy link

It would be great if we could get a callback that would let us change the session object.
In Auth0 you can do this with https://auth0.github.io/nextjs-auth0/types/handlers_callback.AfterCallbackAppRoute.html

Our usecase is fetching the user object from our own database after login and storing the user-id and org-id that we gave that user in the session, next to the ids that workos gave them. Also you could store more information you have about the user in the session instead of having to make db calls every time.

Would have to be async so you can do db calls :)

@PaulAsjes PaulAsjes added the enhancement New feature or request label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants