hello my current auth0provider is
“”"
<Auth0Provider
domain=‘redacted’
clientId=‘reacted’
screen_hint=“signup”
authorizationParams={{
redirect_uri: ‘https://127.0.0.1:5173/ ’,
}}>
,
“”"
here are both of my buttons
“”"
import { useAuth0 } from “@auth0 /auth0-react”;
export function LoginButton() {
const { loginWithRedirect } = useAuth0();
return <button onClick={() => loginWithRedirect()}>Log In;
}
export function SignupButton() {
const { loginWithRedirect } = useAuth0();
return <button onClick={() => loginWithRedirect()}>Sign Up</button>;
}
“”"
where do i add the screen_hint=“signup” ?
thankyou for your help!
tyf
September 19, 2023, 9:36pm
3
Hello @samuelmorganstudent welcome to the community!
You need to include the screen_hint
param in AuthorizationParams :
onClick={() => loginWithRedirect({authorizationParams: {
screen_hint: "signup"
}})}
hello, i continue to get the same response in the browser giving me the login page when i click sign up,
export function LoginButton() {
const { loginWithRedirect } = useAuth0();
return <button onClick={() => loginWithRedirect()}>Log In;
}
export function SignupButton() {
const { loginWithRedirect } = useAuth0();
return <button onClick={() => loginWithRedirect({
authorizationParams: {
screen_hint: “signup”
}})}>
Sign Up
;
}
here are my 2 buttons sign up has the desired params but not the desired outcome on the page!
thanks your your continued support
tyf
September 20, 2023, 4:20pm
6
Hey there @samuelmorganstudent thanks for following up!
Which version of auth0-react
are you using? Are you using New Universal Login or Classic ?
Hello sir:
“@auth0 /auth0-react”: “^2.2.1”,
New universal login page is the one im using
tyf
September 20, 2023, 11:01pm
9
Hey @samuelmorganstudent thanks for confirming!
That’s odd Are you using a social connection (google, facebook, etc.) by any chance? If you inspect the network tab, and look for the /authorize
request when clicking the button, do you see the screen_hint
param being passed?
Yeah the screen hint param is passed however the page still shows login,
const handleSubmit = () => {
// Log all the user choices when the user submits the form
console.log(userChoices);
localStorage.setItem('userChoices', JSON.stringify(userChoices));
loginWithRedirect({authorizationParams: {
screen_hint: "signup"
}})
}
here is my current on submit fuction
here is the response from the network tab
scope:
openid profile email
redirect_uri:
http://localhost:5173
screen_hint:
signup
response_type:
code
response_mode:
query
1 Like
tyf
September 26, 2023, 11:17pm
11
Hey @samuelmorganstudent I apologize for the delayed response - Thanks for the additional information!
samuelmorganstudent:
This looks to be Classic Universal login for which the screen_hint
param won’t work - You can check by navigating to Branding → Universal Login → Advanced options to be sure that you are indeed using New UL.
1 Like
Working Great Thankyou so much!!
1 Like
tyf
Split this topic
September 28, 2023, 10:19pm
13
tyf
September 28, 2023, 10:20pm
14
That’s great news! Thanks for confirming - I’ve moved your follow up question to a new topic, just a heads up
system
Closed
October 12, 2023, 10:20pm
15
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.