6

I have set up a bare bones test for the new google one tap sign in / sign up.

<!DOCTYPE html>
<html lang="en">

<head></head>

<body>
  <script src="https://smartlock.google.com/client"></script>
  <script>
    window.onGoogleYoloLoad = (googleyolo) => {
      googleyolo.hint({
        supportedAuthMethods: [
          "https://accounts.google.com"
        ],
        supportedIdTokenProviders: [{
          uri: "https://accounts.google.com",
          clientId: "xxxxx-xxxxx.googleusercontent.com"
        }],
        context: "signUp"
      }).then((credential) => {
        console.log(credential);
      }, (error) => {
        console.log(error.type);
      });
    };
  </script>
</body>

I expected the above to either spit out the credential object to the console, or to prompt me to choose a google account to log in with. Instead a "noCredentialsAvailable" error type is thrown. This also happens when I use the googleyolo.retrieve promise.

I currently:

  • have a google account signed in and other "google sign in" oauth flows work
  • am loading the above at localhost:3000 (which is also listed as an authorised origin on my google api credentials page)

What am I missing?

Richard Williams
  • 2,044
  • 1
  • 24
  • 28
  • Hmmm, sorry for the trouble, can you try other Google Accounts or see if it works on https://www.wego.com ... a few issues we are aware of: check passwords.google.com for your active Google Account and make sure everything is enabled and it is not a custom passphrase account. Also, which browser are you using? The iPhone emulation in Chrome dev tools is not working at the moment (the user-agent is not valid) – Steven Oct 31 '17 at 18:19
  • Chrome 62.0.3202.75 on Windows 10. (It should work here, should it? Or is it just mobile?) Nothing happens on wego.com (I'm expecting something to prompt me to login - rather than clicking login myself - is that right?). On passwords.google.com I have SmartLock disabled and a sync password set. I've tried enabling SmartLock but still noCredentialsAvailable. – Richard Williams Oct 31 '17 at 20:34
  • Enabling Smart Lock should have done the trick, have you waited a few minutes before trying again? Would you have custom sync passphrase enabled by any chance? – TMSCH Oct 31 '17 at 20:59
  • Ya, if there is a passphrase on the account it's not working right now, but we are working on it. For now, try with regular test gmail account with the default settings. We just published some troubleshooting steps till things are smoothed out and better error messages are in place: https://developers.google.com/identity/one-tap/web/troubleshooting – Steven Nov 01 '17 at 01:41
  • Richard, you should now be able to use Google One Tap with your passphrase account. – TMSCH Jan 09 '18 at 01:13
  • Yes I can. Thanks. – Richard Williams Jan 10 '18 at 15:38

1 Answers1

2

We just published some troubleshooting guidance: https://developers.google.com/identity/one-tap/web/troubleshooting

The most important things to check are the following:

  • ensure that you have an active Google Account and that the Smart Lock feature is enabled. We are working on removing these requirements asap, but for now, try with a regular gmail account with default settings

  • make sure that you supply a Google client ID in any requests and that the domain you are running the code is an authorized origin, including the port. See documentation for details

  • check that you are using a supported user-agent. Importantly, the iOS emulation modes in Chrome Dev Tools are out-of-date (fix pending)

If you still cannot get it working, or have any feedback at all, we'd love to hear from you: reach out to sso@google.com

Steven
  • 3,812
  • 23
  • 38