Refreshing JWT Session in api endpoint? #4881
Unanswered
KoesterJannik
asked this question in
Help
Replies: 1 comment 1 reply
-
You could call the session route and the session will be updated, either on the client side via |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
// Update payment to PAID status once completed await prisma.payment.updateMany({ where: { orderID, }, data: { status: "PAID", }, }); await prisma.user.update({ where: { id: user.id, }, data: { role: "PREMIUM", }, });
Right now the user has to log out and in before the role in the session has changed, is there a way to reset the next-auth cookie and refresh the session?Beta Was this translation helpful? Give feedback.
All reactions