0

I have problems replacing an old app because the IDs of Google Accounts differ between the different login options offered by Google.

I verified with many different emails (personal Gmail and GSuite) that both login methods return different Google User IDs - even if the documenation and other resources claim it's unqiue forever and accross login methods.

Obviously I would have expected that the Google Account IDs are independent of the login method.

Is there any way to match or migrate from the old to the new method?

  • No, you'll need to reverify all your accounts. – new name Nov 22 '22 at 17:23
  • @newname So you say that's a known behavior? Do you think it's a reasonable strategy, the next time somebody logs in to rely on their email and then update the ID of the existing account? – madmaxmatze Nov 22 '22 at 21:31
  • Also think you have to reauthorize everything, the primary reason being that while the identities themselves are the same, with OAuth2, you're talking different access, and more importantly, refresh, tokens. Revoking a refresh token guarantees a need to re-authz unless you can somehow migrate those credentials for all your users over to the new app. FWIW, there's also Cloud Identity Platform, accessible from Cloud Run. It's based on Firebase Auth and adds a bunch of modern features to it plus being _very_ JS/Node-friendly: http://cloud.google.com/identity-platform/docs/product-comparison – wescpy Nov 30 '22 at 00:09
  • @madmaxmatze, did you try out the suggestion from wescpy , were you able to follow them. – Vaidehi Jamankar Dec 04 '22 at 08:31
  • @VaidehiJamankar, for now, everybody just reauthorizes on login and creates a new account (in terms of ID) within my app. All their user data is then migrated from their old account (with the same email) to the newly created one. Hate the process, and the fact that IDs changed, but works for now. Since all (also nongoogle login methods) are using passportjs, I think I cant use te Identity platform – madmaxmatze Jan 15 '23 at 21:55

0 Answers0