I want to make a custom login flow but store users and authenticate with Auth0 in my Next.js app. I’ve seen the nextjs-auth0 npm package but it seems that’s only for the Universal Login (https://github.com/auth0/nextjs-auth0/issues/141#issuecomment-764533775)
Is this correct? If so, is there another way to achieve this? Maybe working with the authentication api directly? Thanks!
Basically it doesn’t matter what stack you’re using. If you want to build the UI of your app yourself and add authentication to it you will need to use endpoints from our Authentication API:
Thanks. Is there anything I need to do beyond just calling the signup and login endpoints? I.e. for login I assume I would need to cache the access_token or something like that? Do you know of a good tutorial for this? Thanks for your help and response!!
Actually, building your own UI/login flow is very complex and we do not recommend doing it. When you do this, you take on all the security risks in your application, instead of passing them off to Auth0.
The Universal Login Page/Auth Code or Auth Code + PKCE is the best way to go.