Login with web browser not working with Google

@mario11 @nick.carroll I was hoping I could get some support from you with signing in with Google. You had both mentioned that there was some way to get it to work in this thread, either via a web view or via the Sign up/login with a web browser action: Refreshing app after OAuth login - #53

I haven’t been able to get any of these methods to work:

Using the action Signup/login with a social network directly within mobile: returns this error from Google. I only tested this on iOS BubbleGo. I tried using this method last year and had similar issues and was told by support that Google was not supported at the time, so I wasn’t expecting this to work:

Using a web view with a page that has the Signup/login with a social network action: @mario11 I believe this is the method you mentioned in the other thread, but I’m not sure. I only tested this on iOS in BubbleGo. I’m using the index of my web app to sign in, which usually works fine on both test and live versions. This method returns this error from Google:

Using the Sign up/login with a web browser action directly within mobile: @nick.carroll I believe this is the method you mentioned in the other thread, and seemed promising since I believe this has been added since I had last tried to get this to work. I’m using the index of my web app to sign in, which usually works fine on both test and live versions. I tested this on iOS in both BubbleGo and within the app deployed through TestFlight. Unfortunately it returns this error from Google in both situations. This is the issue I was running into before, where Bubble is adding URL parameters to the redirect URI, which is not allowed by Google. I can’t find anywhere within Bubble to have it not add these parameters.


Do either of you or anyone else have insight into getting sign in with Google to work?

Did you generate the Oauth keys correctly?

Yeah, this has been working perfectly on the web version of my Bubble app, I just can’t get it to work in mobile.

This is the general setup for using signup/login with a web browser on mobile and oauth 2. Lmk if this helps at all

That’s the third scenario I described above. I’ve implemented it the way it’s laid out here, and it gives me the redirect_uri_mismatch error when running the “Signup/login with a social network” action on the page that I’ve entered into the “signup/login with a web browser” action.

In my mobile app:

On the index page:

Then I get this error, from Google:

Bubble is giving this to Google as the redirect_uri, only when running it through this flow in the mobile app:
https://periwinkle.cobscookinstitute.org/version-test?on_login=1743428722931x630727273698654200

Normally when signing in with Google on the web version of my app, on the same page that I’ve put into the “signup/login with a web browser” action, it just give this as a redirect_uri to Google: https://periwinkle.cobscookinstitute.org/version-test

I’m not sure where the “on_login” parameter is coming from. I didn’t add it, and it seems like Bubble is adding it automatically. Google doesn’t accept variable URL parameters in the redirect_uri, so it’s not possible for this to work.

Hmm thats really strange, never seen this before. Do you have strict settings on the google cloud project?

Not that I’m aware of. As far as I’m aware, this is just part of Google’s OAuth standards, you have to have the exact redirect URI registered with them for it to work. I’ve seen lots of other forum posts where people are missing “www” or a trailing slash, and even that results in an error. Is there a way to not need to register the exact URI?

We have this working properly in BubbleGo. Checking to see if we are doing anything special on our end to enable this, but I dont think so

Interesting. I just tapped sign in with Google on BubbleGo, and this is the beginning of the URL it went to for OAuth. It looks like the redirect_uri doesn’t contain any URL parameters, so maybe something special was done for the app?

https://accounts.google.com/v3/signin/identifier?opparams=%253Fservice%253Dlso%2526ddm%253D1%2526flowName%253DGeneralOAuthFlow&dsh=S-166517003%3A1743516587187552&access_type=offline&client_id=<redacted>&ddm=1&flowName=GeneralOAuthFlow&o2v=1&prompt=consent&redirect_uri=https%3A%2F%2Fbubble.io%2Fapi%2F1.1%2Foauth_redirect&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&service=lso

redirect_uri:

https://bubble.io/api/1.1/oauth_redirect

I’m not sure how to get Bubble to do this for my app. It’s automatically adding a URL parameter to the redirect_uri as far as I can tell.

do you have the use generic redirect checkbox checked on the plugin?
Screenshot 2025-04-01 at 16.44.54

That worked! Thanks so much for your help.

ahhh beauty, good to hear

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.