I would like to redirect my users to a signup page directly.
[X] I have checked the documentation for this library.
[X] I have checked the Auth0 Community for related posts.
[X] I have checked for related or duplicate Issues and PRs.
[X] I have read the Auth0 general contribution guidelines.
[X] I have read the Auth0 Code of Conduct.
Please provide the following:
When I want my users to login, I simply call auth.authorize() like below :
const` auth = new auth0.WebAuth({
clientID: '...',
domain: '...'
});
// Show the sign-up screen
auth.authorize();
I found a recent comment describing this possiblity :
https://github.com/auth0/auth0.js/issues/311#issuecomment-483327124
passing an additional mode argurment with signUp value
const` auth = new auth0.WebAuth({
clientID: '...',
domain: '...'
});
// Show the sign-up screen
auth.authorize({ mode: 'signUp' });
However using this parameter, users will get redirected to the standard login page instead of signup.
In Chrome console I have this information
Following parameters are not allowed on the `/authorize` endpoint: [mode]
I would like to know what is the recommanded way to redirect users to signup page directly
Thanks
I would like to know that as well.
This API is also shown in the TypeScript typings but it just does not work.
Is this implemented or not?
The same API is mentioned here
https://community.auth0.com/t/how-to-redirect-user-to-hosted-signup-page/9482
But only for hosted login pages?
If I host my login page myself, I could just use .signUp() method, or am I missing something?
This doesn't seem to be possible in the universal login form even.
Adding a mode=signUp parameter doesn't consistently work on reload.
The mode option is not something that is supported OOTB. If you go back to the community post you mentioned, it's a two-step task. You have to update your Universal Login Page template to change the initialScreen parameter based on the mode parameter you sent.
Currently, it is not possible to add additional parameters to the authentification url, like e.g. display=popup mentiond here: https://auth0.com/docs/api/authentication?javascript#social, am I right?
I would like to propose support for this, i.e. allow to add some extraParams to the WebAuth config object.
If this would be available, one could send a parameter to change the initialScreen or deactivate, for example, the registration on the Univeral Login Page.
Ah, I just found out at that, indeed, it is possible to add arbitrary params in the WebAuth.authorize function, but not in the WebAuth constructor.
So, auth.authorize({ mode: 'signUp' }); mentioned above and in #311 is possible!
On problem is, that the parameter list in https://github.com/DefinitelyTyped/DefinitelyTyped/blob/cbdce7fb10d4396810a6068767da25eb80c33623/types/auth0-js/index.d.ts#L821 is fixed.
For Typescript is would be cleaner to consolidate arbitrary params in an extraParams key. So I stay with my proposal above.
Would be good for auth0 to pay more attention to issues like this. A prominent podcaster building a product with great traction and visibility decided not to use auth0 because of this issue!!
Most helpful comment
I would like to know that as well.
This API is also shown in the TypeScript typings but it just does not work.
Is this implemented or not?
The same API is mentioned here
https://community.auth0.com/t/how-to-redirect-user-to-hosted-signup-page/9482
But only for hosted login pages?
If I host my login page myself, I could just use
.signUp()method, or am I missing something?