Documentation error in Web SDK Google login

I believe the documentation here that gives example code of Google One Tap flow has an error.

The code example has:

const credentials = Realm.Credentials.google({ id_token: response.credential });

Whereas the property should be idToken not id_token.

This is correct in the Node SDK documentation.

This took me ages to solve, so hopefully this helps someone else. I couldn’t see else how to notify MongoDB about this, since I don’t have a paid support plan so no way of contacting them directly.

Hey @Daniel_Bernasconi - you’re absolutely right, that’s a typo. I’m sorry you spent a lot of time debugging that! I’ve just pushed an update to the documentation that fixes it. If you refresh the page, you should see the corrected snippet there.

Thanks for bringing it to our attention!

1 Like

And for future reference, the MongoDB JIRA issue tracker is here: SAML Login - MongoDB Jira - MongoDB Jira

1 Like