Two questions about Google OAuth Login

Question 1:

I implemented logging in with Google OAuth. This login flow works fine with one account I’m using (let’s call this Account1).

I’ve logged in via Google using a different Google account (Account2). I can run the Bubble app as Account2. But, if I start off in the logged-out state, and then try to log in via Google with Account2, I get the “This email is already in use” error:

I think what happened is that I have a workflow somewhere else that creates new accounts if a user shares an object with an email address that doesn’t exist in the database yet. I’m guessing that Account2 was first created via this flow, and it’s somehow not linked to the Google OAuth. Is that a possibility, and is there a fix for that?

Question 2:

Since new users can be created in my app by other users (i.e. when they share an object with a new email address), I ideally want to implement deduping addresses by stripping away "."s. For example, is one account gets created as and later that recipient tries to Google OAuth in as, I’d like to detect that and treat it as one account. Is there a way to do that?

On Question 2: You can do that by adding a workflow that checks it before moving forward. For example, when someone enters instead of Gmail, the workflow will correct it. But as for the 2 example emails, those can be separate emails because Google allows “.” in emails.

For Question 1: I have a link below, I was running into this issue as well.

This topic was automatically closed after 70 days. New replies are no longer allowed.