Hey everyone, I’ve been working on a Bubble app that allows users to log in via Google OAuth or the traditional username/password method. I’ve also created some browser extensions that integrate with this login system. For username/password login through the extensions, I use Bubble’s “Log the user in” action, obtain a session token, and everything works fine without needing to check the “Ignore privacy rules when running this workflow” option.
However, I’m running into issues with the Google login through the extension. Here’s the process I’m following for OAuth:
To initiate the OAuth flow and obtain the access/refresh token, I’m using:
chrome.identity.launchWebAuthFlow
Once I have the access token, from Bubble I call Google’s User Info API to retrieve the user’s email, check if it exists in my Bubble database, and return that info to the extension.
The problem is, unlike traditional username/password logins, I don’t get a Bubble session token for the Google login process. So, Bubble doesn’t recognize that the user is logged in and I can’t log him in because there’s no password, right?
My questions are:
- Should I be handling the Google OAuth consent flow directly within Bubble instead, like a User-Agent flow?
- How can I get Bubble to recognize this Google user and issue a session token after completing the OAuth flow?
Thanks in advance for your help!