lukas
October 28, 2019, 11:27am
1
Hello, how I can set initial authentication screen on auth0-spa-js? By default it’s always login, however, we would like to open sign up form first in some cases. Any help would be highly appreciated.
const client = await createAuth0Client({
domain: REACT_APP_AUTH0_DOMAIN || "",
client_id: REACT_APP_AUTH0_CLIENT_ID || "",
redirect_uri: REACT_APP_AUTH0_REDIRECT_URI || "",
audience: REACT_APP_AUTH0_AUDIENCE_API,
scope: "openid email profile",
});
this.auth0 = client;
}
async login() {
await this.auth0.loginWithRedirect();
}
async signup() {
// How can set it here?
await this.auth0.loginWithRedirect();
}
1 Like
Hey there @lukas !
Let me find that for you and get back here soon!
lukas
October 28, 2019, 1:32pm
4
@konrad.sopala Thank you. I will be waiting!
lukas
October 29, 2019, 2:35pm
5
@konrad.sopala Hello, no news on this yet?
Hey there!
I managed to get some info on this topic. So basically when using new Universal Login not the classic one, unfortunately it’s not possible to change initial screen.
Hi @lukas ,
are you using the New ULP or the Classic ULP - it’s not clear from the questions?
For the Classic ULP, the initialScreen
parameter would be the way to go. But as @konrad.sopala said, it’s only available in the Classic ULP.
https://auth0.com/docs/libraries/lock/v11/configuration#initialscreen-string-
1 Like
system
Closed
November 30, 2019, 10:23am
8
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
Update on this: the New ULP now also supports it by passing the following parameter to the authorization request.
screen_hint='signup'
4 Likes
Thanks for updating that @mathiasconradt !