Auth-module: signUpWith() -> open default signUp flow in Auth0

Created on 29 Aug 2018  路  7Comments  路  Source: nuxt-community/auth-module

What problem does this feature solve?

Currently loginWith('auth0') opens up the default login flow. This works well with "Login" buttons, but there is currently no option to trigger the "Sign Up" flow that Auth0 provides.
While there aren't much docs to go on,
https://auth0.com/docs/libraries/lock/v10/configuration#initialscreen-string-
there are a few discussions:
https://community.auth0.com/t/hosted-pages-link-to-signup-or-login-as-intial-screen/7845/3
https://community.auth0.com/t/how-to-open-login-signup-on-the-universal-login-hosted-page/12642/2

What does the proposed changes look like?

perhaps something like:
GET https://YOUR_AUTH0_DOMAIN/authorize? response_type=code|token& client_id=YOUR_CLIENT_ID& connection=CONNECTION& redirect_uri=https://YOUR_APP/callback& state=STATE &mode=signUp

The &mode=signUp would be a custom param & would be passed to initialScreen: config.extraParams.mode in the lock. This would require a small explanation in the docs, describing how to add the custom param line to the lock template in the Auth0 UI

This feature request is available on Nuxt community (#c190)
enhancement

Most helpful comment

Hi again. I did a little more research on the auth0 login experience. As explained in Login with Auth0 there are two different experiences Universal and Classic which you have to switch to new one if want directly going to signup page:

image

After upgrading to Universal Experience, we have to provide two params in order to always show signup page to users:

$auth.loginWith('auth0', {  params: {  screen_hint: 'signup', prompt: 'login' } })

image

All 7 comments

Are there any news regarding this issue? Is there an alternative way to achieve this?

Is there a workaround for this? I want Sign Up buttons to show the signup form of course

UNTESTED

I think you can do this:

$auth.loginWith('auth0', { params: { mode: 'signup' } })

Doesn't work for me 馃槥

Hi again. I did a little more research on the auth0 login experience. As explained in Login with Auth0 there are two different experiences Universal and Classic which you have to switch to new one if want directly going to signup page:

image

After upgrading to Universal Experience, we have to provide two params in order to always show signup page to users:

$auth.loginWith('auth0', {  params: {  screen_hint: 'signup', prompt: 'login' } })

image

Awesoooome 鉂わ笍 馃槏 it works!!! 馃帀

Another solution which works for me (and the previous one did not):

$auth.loginWith("auth0", {
  params: {
    mode: "signup",
    prompt: "login",
    /* another params */
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ishitatsuyuki picture ishitatsuyuki  路  4Comments

varna picture varna  路  4Comments

pi0 picture pi0  路  3Comments

aaronhuisinga picture aaronhuisinga  路  3Comments

dasisyouyu picture dasisyouyu  路  3Comments