Sign in user after creation through the management API

In our Laravel application we’ve implemented a custom user registration flow that will create a database user (custom database). This is done by calling the management API users/create.
Is it possible to automatically sign in the new user after creation, without having them to enter their credentials in the Auth0 login page?

Hi @steven.oeyen,

It may be possible, but can be quite complex.

After creation there is no token issued for the user. Typically, the token issued after login represents the user and provides them with their “session”. In some cases a cookie is also issued that persists the session.

In order to obtain the token without user interaction, you will need to have access to the user’s credentials, which you can exchange directly for the token via the Resource Owner Password Flow. This flow is somewhat dubious because it requires you to handle the user’s password, although you may already be doing this.

If I could suggest a more elegant solution; I would have your user log in, then present a secondary signup form that collects the necessary info.

hi @dan.woda ,

thanks for the update. Your suggestion was indeed the approach I decided on.

This article was also useful.
Understand How Progressive Profiling Works (auth0.com)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Hey team!

This topic seems related to our new EA feature, Forms for Actions, which rolled out of the beta stage on May 7th. Our Product team prepared the whole Documentation page with examples of Use cases. Forms for Actions. If you find yourself having questions regarding this new feature for the next two weeks, we are hosting an Ask Me Anything session. Our Product Expert will provide comprehensive written answers on May 21st from 8 AM to 10 AM PST.
Find out more about Forms for Actions and learn more about AMA.

Thanks!
Dawid