Is next-auth the right choice for me? #2640
-
Im wondering if next auth is a fit for our new platform. We are currently using a cookie session based setup but are looking at porting to a jwt approach. We've made an authentication service that we would like to use. An example of a access/refresh token can be seen here:
What im wondering is if its possible to use credentials and the password grant type with next-auth? I hope someone could give me some pointers on what to do and how to work around these things :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
you can use the |
Beta Was this translation helpful? Give feedback.
you can use the
authorize
callback of the credentials provider to send credentials to your api and get back the result in the jwt and session callbacks:https://next-auth.js.org/providers/credentials
https://next-auth.js.org/configuration/callbacks