1. Install the Google OAuth plugin by Najmuzzaman

2. You need your API Key and App Secret from google console
Click Credentials > OAuth 2.0 Client IDs > Web client
You want the Client ID and Client Secret on the right hand side. These are referred to as the API Key and App secret later on.

3. While you’re in the google console be sure to add the url you want to jump back to after a user has logged in via google. Something like https://testapp.bubbleapps.io/version-test?debug_mode=true as an authorized redirect URI should do.

4. Click Plugins > Google OAuth. Enter your API Key and App secret on the plugin configuration

5. Now you’re onto the Bubble set up. Go to Workflow

6. Add whatever event you want to trigger the Google login, eg. a button named login is clicked

7. Now choose to add an action. The action you want is under Account > Signup/login with a social network

8. This will pop up the typical Bubble configuration box where you select the OAuth provide. In this case it’s Google Oauth. You can ignore the Enter API Key button as you already entered the API key earlier.

9. The button should now take you to the Google sign-in when clicked

Your user is now logged into your app with their google profile. As a simple example you can retrieve details from the user’s google profile in order to display their name.

Common Errors
Invalid API Client: Your API Key or Secret are entered incorrectly on bubble

Invalid Redirect URI: Your redirect URI is not set up on Google or doesn’t exist in your bubble app

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
BBCode format allowed