magic-js icon indicating copy to clipboard operation
magic-js copied to clipboard

Force google account chooser

Open mlnchk opened this issue 3 years ago • 0 comments

✅ Prerequisites

  • [x] Did you perform a cursory search of open issues? Is this feature already requested elsewhere?
  • [x] Are you reporting to the correct repository (magic-sdk)?

✨ Feature Request

Now, if my browser knows only one google account, Magic login flow skips Google account chooser and logs me into the only account available. But sometimes I need an opportunity to use chooser because there is a "Use another account" button on this page.

CleanShot 2021-12-05 at 16 11 03@2x

🧩 Context

The change is pretty simple, it is just one URI parameter at the same level that scopeprompt. You can see docs here.

💻 Examples

I think, it should look something like this:

magic.oauth.loginWithRedirect({
    provider: 'google',
    redirectURI: `${BASE_URL}/auth/success/oauth`,
    prompt: 'select_account',
  })

mlnchk avatar Dec 05 '21 13:12 mlnchk