https://authjs.dev/
Here is the token generation logic
https://github.com/nextauthjs/next-auth/blob/main/packages/n...