question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webAuth({ prompt: 'signup' }) doesn't work as expected

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
gax97commented, Jan 17, 2022

You were right, it only works with Universal Login Experience. Thanks for clarifying. I made it work right now.

1reaction
IbrahimSabericommented, Dec 21, 2021

Thanks for the clarification!

Read more comments on GitHub >

github_iconTop Results From Across the Web

auth0.webAuth.authorize sometimes does not resolve and ...
When the user pressed a button, then the login screen actually appears, and I can type and if I type the wrong password...
Read more >
webAuth.authorize() prompt=login option doesn't work with ...
When calling webAuth.authorize() and setting prompt=login , it works with supported social connections including Google, Facebook, ...
Read more >
Troubleshooting Web Authentication on a Wireless LAN ...
After you configure web authentication and if the feature does not work as expected, complete these steps: Check if the client gets an...
Read more >
IOS 15: WebAuthn catches error but still prompts user
On Windows, the error is not thrown before the user has completed the faceid prompt, which means the registration-process is experienced exactly ...
Read more >
Troubleshoot single sign-on setup issues in Office 365, Intune ...
Run the Azure Active Directory Module for Windows PowerShell as an admin. ... If a seamless, no-prompt experience is expected for domain-joined and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found