Auth0 Home Blog Docs

hosted pages - link to signup or login as intial screen?

signup
hosted-login-page

#1

I see the initialScreen option to lock can be used to control what UI is presented at first to the user and I would like to drive this off some hint in the config on the hosted login/signup page.

Server-side, I’m using node/express and passport-auth0. Is there any way to pass something in here that I can use in the hosted page’s lock code?


#2

@chris.whatley you can pass in custom parameters to hosted login page to handle this. Please refer to https://auth0.com/docs/hosted-pages/login#pass-in-custom-parameters


#3

Thanks, but that is just part of the equation. I’m using passport-auth0 and want a way to have a /register controller in my app that calls passport.authenticate(‘auth0’) in a way that communicates to the hosted lock page that it should display a signup instead of login.

E.g., I’d like to be able to do something like passport.authenticate('auth0', {initialScreen: 'SignUp'}) and have that available in the config on the hosted lock page, but the auth0 passport strategy filters out anything it is not specifically designed to accept there.


#4

Thanks, but that is just part of the equation. I’m using passport-auth0 and want a way to have a /register controller in my app that calls passport.authenticate(‘auth0’) in a way that communicates to the hosted lock page that it should display a signup instead of login.

E.g., I’d like to be able to do something like passport.authenticate('auth0', {initialScreen: 'SignUp'}) and have that available in the config on the hosted lock page, but the auth0 passport strategy filters out anything it is not specifically designed to accept there.


#5