# Login and Sign up buttons

**URL:** <https://community.auth0.com/t/login-and-sign-up-buttons/116642>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [September 19, 2023, 6:18pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642 "2023-09-19T18:18:14Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuelmorganstudent](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/samuelmorganstudent/32/51003_2.png) [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Post date:** [September 19, 2023, 6:18pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/1 "2023-09-19T18:18:14Z")

</div>

hello my current auth0provider is

“”"  
\<Auth0Provider  
domain=‘redacted’  
clientId=‘reacted’  
screen\_hint=“signup”  
authorizationParams={{  
redirect\_uri: ‘[https://127.0.0.1:5173/](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!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 19, 2023, 9:36pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/3 "2023-09-19T21:36:32Z")

</div>

Hello @samuelmorganstudent welcome to the community!

> [@samuelmorganstudent](#):
>
> where do i add the screen\_hint=“signup” ?

You need to include the `screen_hint` param in [AuthorizationParams](https://auth0.github.io/auth0-react/interfaces/AuthorizationParams.html#screen_hint):

```auto
 onClick={() => loginWithRedirect({authorizationParams: {
                    screen_hint: "signup"
          }})}

```

---

<div class="post-metadata">

**Author:** ![samuelmorganstudent](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/samuelmorganstudent/32/51003_2.png) [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Post date:** [September 20, 2023, 12:20am UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/4 "2023-09-20T00:20:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 20, 2023, 4:20pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/6 "2023-09-20T16:20:11Z")

</div>

Hey there @samuelmorganstudent thanks for following up!

Which version of `auth0-react` are you using? Are you using [New Universal Login or Classic](https://auth0.com/docs/authenticate/login/auth0-universal-login/new-universal-login-vs-classic-universal-login)?

---

<div class="post-metadata">

**Author:** ![samuelmorganstudent](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/samuelmorganstudent/32/51003_2.png) [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Post date:** [September 20, 2023, 10:42pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/7 "2023-09-20T22:42:50Z")

</div>

Hello sir:

“@auth0/auth0-react”: “^2.2.1”,

---

<div class="post-metadata">

**Author:** ![samuelmorganstudent](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/samuelmorganstudent/32/51003_2.png) [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Post date:** [September 20, 2023, 10:43pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/8 "2023-09-20T22:43:07Z")

</div>

New universal login page is the one im using

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 20, 2023, 11:01pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/9 "2023-09-20T23:01:14Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![samuelmorganstudent](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/samuelmorganstudent/32/51003_2.png) [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Post date:** [September 22, 2023, 1:12pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/10 "2023-09-22T13:12:00Z")

</div>

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

> 1. scope:
> 
> openid profile email
> 
> 1. redirect\_uri:
> 
> [http://localhost:5173](http://localhost:5173)
> 
> 1. screen\_hint:
> 
> signup
> 
> 1. response\_type:
> 
> code
> 
> 1. response\_mode:
> 
> query

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/3/63a3b9983cdc34fd40a4431d340775a4dced3114.png)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 26, 2023, 11:17pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/11 "2023-09-26T23:17:00Z")

</div>

Hey @samuelmorganstudent I apologize for the delayed response - Thanks for the additional information!

> [@samuelmorganstudent](#):
>
> ![image](https://global.discourse-cdn.com/auth0/original/3X/6/3/63a3b9983cdc34fd40a4431d340775a4dced3114.png)

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.

 ![Screenshot 2023-09-26 at 4.15.24 PM](https://global.discourse-cdn.com/auth0/original/3X/f/b/fbfe4e08c59117d44bc992df94234c84c9d052d9.jpeg)

---

<div class="post-metadata">

**Author:** ![samuelmorganstudent](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/samuelmorganstudent/32/51003_2.png) [@samuelmorganstudent](https://community.auth0.com/u/samuelmorganstudent)\
**Post date:** [September 27, 2023, 9:57am UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/12 "2023-09-27T09:57:18Z")

</div>

Working Great Thankyou so much!!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 28, 2023, 10:19pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/13 "2023-09-28T22:19:06Z")

</div>

A post was split to a new topic: [Allow a specific user to access their data in django backend](https://community.auth0.com/t/allow-a-specific-user-to-access-their-data-in-django-backend/117374)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 28, 2023, 10:20pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/14 "2023-09-28T22:20:09Z")

</div>

That’s great news! Thanks for confirming - I’ve moved your follow up question to a new topic, just a heads up 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 12, 2023, 10:20pm UTC](https://community.auth0.com/t/login-and-sign-up-buttons/116642/15 "2023-10-12T22:20:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
