Auth0 Home Blog Docs

Automatic Login after Registration

Hi,

I currently have a web app using the auth-js library, and have created a custom login and sign-up form which use the methods: webAuth.login() and webAuth.signup().

Is there any way to automatically login after signing up?

When a user successfully signs up, the response from webAuth.signup() looks like this…

response = {
Id: “j5j5j5j5ce0542csDFDFZFfxc”,
email: "some_email@gmail.com",
emailVerified: false
}

… and the user must then login manually.

Is it possible to have an access token returned from webAuth.signup()?

Thank you!
Ryan

To my knowledge signup cannot return tokens, but in that particular situation given you have the user credentials why can’t you just initiate the login after the success response from signup. Your use of Auth0.js suggests this is a browser-based application and you are using custom login and signup forms embedded in your application so as part of the signup the end-user provides you with their (new) credentials which you may immediately use after the signup success callback.

1 Like

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