Automatic login with no user interaction


I am struggling to understand if it’s possible to have a flow where,

  • User makes a purchase with filled in user details (clicks submit)
  • Purchase is handled and if succeeded => an Auth0 user is created server-side with Management API
  • The user gets logged in on the client with no interaction

I’m using nextjs-auth0, but I can’t find any way to add token to cookie. Are there any way to achieve the flow that I want or do I need to look for another solution?

I have been reading some posts that are referenced when searching but I cannot find any straight answer to my question

Hi @erhise
What kind of user? Federated or Social? email/password? Passwordless?

If it is an email/password user, how would the password be set in your flow. Even if you could log them in, they wouldn’t be able to log in later without a password reset flow.

Provide some more details and I will try to help.


1 Like

Hi, thanks for quick reply. Sorry I was sloppy I didn’t provide enough context. The situation would be email/password. The intention was to just create a random password which the user later can reset.

I’m open to any suggestion or changes the most important part is that the user don’t need to interact with the login state DIRECTLY after purchase