Closed ferrjohnpainagan closed 1 year ago
Based on your comment in the other issue, did it work before with using V1 of the SDK? If it did, what code did u use ?
If not, can you help me understand what needs to be done in order to get the user to the signup page, would it include sending a custom parameter to auth0?
nope i wasnt able to try using the v1 of the sdk.
what i want is to redirect me to the SIGNUP page of my custom auth0 signup(not LOGIN). it doesnt include sending a custom parameter
it doesnt include sending a custom parameter
It should always include something to send from the application to Auth0 which is typically done using custom parameters, would this FAQ help you achieve what you want? It explains it both when using the new and classic experience.
As you can see, in that case they are using a custom parameter called action
with a value of signup
.
Note that for v2 of our SDK, this would become
loginWithRedirect({ authorizationParams: { action: 'signup' }});
So what is happening when using the classic experience is:
initialScreen
when instantiating lock to either signUp
or login
.When using the new experience, all you need to do is call:
loginWithRedirect({ authorizationParams: { screen_hint: 'signup' }});
got it! i was able to pass the custom params and handled it properly on the custom login page!
thanks @frederikprijck !
Checklist
Description
i have nextjs app that has auth0-react installed
this is how i structured my _app file
i have a custom login/signup experience so this code below doesnt work. it will only redirect me to the login page.
what i want is to be able to redirect to the custom signup page i created using auth0-react
Reproduction
Additional context
No response
auth0-react version
"@auth0/auth0-react": "^2.2.1",
React version
"next": "^13.4.2", "react": "18.2.0",
Which browsers have you tested in?
Other