Closed ByronCobb closed 2 years ago
Hmm. If I'm understanding what you want correctly, the JWT callback is the one you want. It's called JWT, but really what you're being given is the data in the JWT (see ./src/auth.ts
) which you can change as you wish. It's a plain old JavaScript object that you can also modify the types of if you need to.
I've come across a scenario in which I would like to add additional information to the created token. I see there is a
jwt
callback, but I don't want to re-implement the cookie logic. It would be great if there was a callback that could manipulate the token just before it is saved to the cookie.Something like this
Thoughts?