webAuth({ prompt: 'signup' }) doesn't work as expected
See original GitHub issueDescribe the problem
The prompt
option seems to be ignored when callng ...webAuth.authorize({ prompt: 'SOME_PROMPT' })
What was the expected behavior?
I expected prompts as outlined here to result in the proper webauth screens being pulled up. I’ve tried signup
, signup-password
, login-password
.
Reproduction
I’m not sure if I’m using these fields correctly or if I’m missing some other critical information; I’m currently calling authorize
as the following:
export const signIn = (method: 'Google' | 'Facebook' | 'Apple' | 'Email', create?: boolean) => {
const SOCIAL_MAP = {
Apple: 'apple',
Google: 'google-oauth2',
Facebook: 'facebook'
};
const currentUserAndCredential: Credentials = await auth0.webAuth.authorize({
scope: 'openid profile email offline_access',
connection: method && method !== 'Email' ? SOCIAL_MAP[method] : undefined,
prompt: create && method !== 'Google' ? 'signup-password' : 'login'
});
}
I’ve also tried omitting different keys and different scopes as well to no avail. Totally considering that I’m calling this the wrong way, but I’ve peeked both through the source and through documentation and I’m not sure what exactly I’m doing wrong here.
I’ve looked at the documentation and don’t see a prompt
field there, but it IS included in the TS definitions. Is this just a carry-over from the regular JS library or is it used for other things (e.g. the one I know of is the select_account
prompt when forcing google-oauth2
connections to show the account selection screen).
Environment
- Version of this library used: 2.10.0
- Which framework are you using, if applicable: RN 0.63.3
- Other modules/plugins/libraries that might be involved:
- Any other relevant information you think would be useful:
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
You were right, it only works with Universal Login Experience. Thanks for clarifying. I made it work right now.
Thanks for the clarification!