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?