Error fetching info from OAuth2 provider (realm-web)

We’ve recently upgraded from Stitch to Realm and are authenticating to Google using the official documentation guide. I receive the id_token from Google and pass it along to MongoDB using this code:

const credentials ={ idToken });
app.logIn(credentials).then((user) => {
   console.log(`Logged in with id: ${}`);

That’s when I receive a 401 error, with this message in the logs: error fetching info from OAuth2 provider

If I switch on OpenID in Realm, suddenly it works, however that’s not helpful for my situation, as I need to retrieve the user’s email address.

I’m on version 1.7.0. I’m using this official package.