hey everyone! i'm building an app with next.js, grafbase, and supertokens. wondering if the userid generated in the email/password auth recipe can be treated like a jwt?
n
nkshah2
05/22/2023, 6:12 AM
Hi @heather
The access token generated by the session recipe can be used as a JWT. If you are using our frontend SDKs we provide a function to get the access token that you can then send to any service you like
h
heather
05/24/2023, 6:36 AM
the userID can be used as a JWT? or the JWT is accessed from the sessions?
is it recommended to use a jwks endpoint? grafbase recently added support for this!
n
nkshah2
05/24/2023, 7:08 AM
So the user id is a plain string, SuperTokens provides an access token that is a JWT and can be used with external services. JWKs is a better option yes. Our docs have a section covering how you can setup JWT based auth and how to configure jwks, I recommend starting there
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).