Login/signup widget question

Is there a way to show the login page with the signup tab pre-selected?

-greg

1 Like

Just curious, considering people sign up once and (hopefully) log in many timesā€¦ is there a specific reason for defaulting to sign up?

It would be confusing for a user to click on a button labeled ā€œsign upā€ and be taken to a login dialog.

Oh, so something like this: Sign Up - Auth0 :thinking:

It doesnā€™t need to be only a signup page. I actually like the combo dialog. I just need to be able to control which tab it shows.

Hey there @glayer!

Iā€™m just checking whether itā€™s possible to achieve that. Let me get back to you once I find something on that!

Hi, Iā€™m also interested in the answer to this question. Is this possible at all?
For example, Iā€™d like to have 2 buttons on my page, ā€œLoginā€ and ā€œSignupā€, which point to auth0.com/login url, but for the signup link, Iā€™d like that the Signup tab gets autofocused/autoselected somehow, instead of a user having to manually select it, in order to perform a sign up process.

Same question here:

itā€™s referring to this initialScreen option of the Lock widget:

https://auth0.com/docs/libraries/lock/v11/configuration#initialscreen-string-

1 Like

Here is the login html that I am using in my universal login setup. Check out http://mytrainingdocs.com to see the usage live.


Sign In with Auth0

I see. So for SPAs, there is an ā€œinitialScreenā€ parameter, when creating an Auth0Lock object.

But what about a classic web-app (not SPA)? How do you achieve it in that way?
For example, a visitor reaches your web page, clicks on the SignUp link and your web server calls the HttpContext.ChallengeAsync method (in ASP.NET for example), which essentially redirects a visitor to an uri like:

https://<auth0-app-name>.eu.auth0.com/authorize
    ?client_id=<cid>
    &redirect_uri=<callback-uri>
    &response_type=code
    &scope=openid%20profile
    &response_mode=form_post
    &nonce=<nonce>
    &state=<state>
    &x-client-SKU=<x-client-sku>
    &x-client-ver=<x-client-ver>

After that page loads, the login/signup screen is displayed and thatā€™s where it would be great if we could auto-select the ā€œsignupā€ tab.