# After registering a new user, the user is prompted to login again before accessing our application

**URL:** <https://community.auth0.com/t/after-registering-a-new-user-the-user-is-prompted-to-login-again-before-accessing-our-application/41431>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [April 20, 2020, 4:50pm UTC](https://community.auth0.com/t/after-registering-a-new-user-the-user-is-prompted-to-login-again-before-accessing-our-application/41431 "2020-04-20T16:50:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mario2/32/9242_2.png) [@mario2](https://community.auth0.com/u/mario2)\
**Post date:** [April 20, 2020, 4:50pm UTC](https://community.auth0.com/t/after-registering-a-new-user-the-user-is-prompted-to-login-again-before-accessing-our-application/41431/1 "2020-04-20T16:50:41Z")

</div>

Hello Auth0 community!

Me and a small team are building a SPA app that uses Auth0 for authentication (yay!) we currently have a small issue/question.

1. A user registers for our app using our sign-up form
2. We create a user in auth0 and in our user table of our app upon submission (we link the user to our database of users with the auth0 token)
3. The user is then forced to login using their new credentials at [subdomain.auth0.com/login](http://subdomain.auth0.com/login) before we let them into our app (we dont have an active session for them)

How can we create a user on sign-up and also create a session at the same time? Is there a way to create a token once you create a new user (with an auth request from the backend of our app)?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 23, 2020, 4:34pm UTC](https://community.auth0.com/t/after-registering-a-new-user-the-user-is-prompted-to-login-again-before-accessing-our-application/41431/3 "2020-04-23T16:34:01Z")

</div>

Hi @mario2,

Welcome back!

> [@mario2](#):
>
> SPA app that uses Auth0 for authentication (yay!)

😄

> [@mario2](#):
>
> How can we create a user on sign-up and also create a session at the same time? Is there a way to create a token once you create a new user (with an auth request from the backend of our app)?

This thread goes into detail about some strategies to handle that scenario:

> [@Silent Auto-Login for User after Completing 'Authentication API'-Backed Custom Signup Form](http://community.auth0.com/t/silent-auto-login-for-user-after-completing-authentication-api-backed-custom-signup-form/29790/7):
>
> Hey @Grant-Hoover! I’m chiming in with an alternative approach. What I would do is simply create the session for the user after the signup, without doing the resource owner password grant token exchange. E.g.: [HttpPost] public async Task\<IActionResult\> SignUp(NewUserData user) { // this is your process that calls Management API v2 // to create the user and any other necessary tasks var createUserResult = await CreateUser(user); // Everything's good, now go ahead and sign the user …

I don’t think there is a turn key solution, but it can certainly be done.

Hope this helps!  
Dan

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 7, 2020, 8:34pm UTC](https://community.auth0.com/t/after-registering-a-new-user-the-user-is-prompted-to-login-again-before-accessing-our-application/41431/4 "2020-05-07T20:34:06Z")

</div>

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