- it’s not supported with Lock but has been added to the product backlog, though a while ago already. Related Github ticket is at Repeat password on sign up · Issue #61 · auth0/lock · GitHub
If needed, that would require a custom UI at the moment.
- There are two ways to achieve it:
A)
In any case, one solution regardless of SDK used would be to use two different callback URLs, such as:
http://localhost:3000/callback?register
and http://localhost:3000/callback?login
(you’d need to add those to the allowed callback URLs as well) and then check this in the login page from config.callbackURL
and make a decision based on that which initialScreen
to show.
B)
If you’re using auth0-js (not auth0-spa-sdk), then you could add the mode
parameter to the authorize request, like this:
login(customState) {
webAuth.authorize({
appState: customState,
mode: 'signUp'
});
}
and read it in the login page (Auth0 > Dashboard > Universal Login > Login > Use Custom Page) via config.extraParam.mode
to set the correct initialScreen
.
Also see the answer on