Log the user in immediately after registration

  • “auth0”: “^2.35.0”,
  • “express”: “^4.14.1”,
  • “passport”: “^0.3.2”,
  • “passport-auth0”: “1.4.0”,

After the user registers, I want to use the provided user credentials on the server side to set up the express session with passport.js to log the user in and not make him see the log in screen. I would want to automatically log in the user after I create the account in Auth0 through ManagementClient of the ManagementAPI:

    const createUser = await AuthService.createUser({
        email_verified: true,
    passport.logTheUserIn('auth0', { userLogin, userPassword });

I am using auth0 and I know there is such a thing as prompt=none param and Silent Authentication but I have no idea how I can run such a process when the user was not yet logged in.

On the server side I am currently redirecting the user to /login route where I run the auth0 process with passport.js:

    passport.authenticate('auth0', {
      scope: 'openid email profile',

Is there an option to invoke some things during the registration process on the server side to avoid this prompt step?

There was also a similar topic but it did not reach any conclusion.