In this guide, we'll walk through how to integrate Google OAuth authentication using Xano as the backend service and Bubble as the frontend. Google OAuth allows users to sign in or sign up for your application using their existing Google account, providing a seamless authentication experience.
Before we start, you'll need to have the Google OAuth marketplace extension installed in your Xano workspace. This extension provides pre-built API endpoints to handle the OAuth flow.
Google OAuth Init API endpoint from the Google OAuth extension.auth_url result from the API call to open an external website (the Google OAuth page).Google OAuth Continue API endpoint from Xano. This endpoint requires two parameters:code: Get this value from the page URL using the Get data from page URL dynamic data function and the parameter name code.redirect_uri: Use the same authorized redirect URI you configured earlier.token result from the API call in the browser's local storage using the Send storage element action.Refresh page navigation action.Get storage element action.Get data from external API call dynamic data function to call the Auth Me API endpoint from Xano.Authorization header using the format Bearer [token], where [token] is the value you retrieved from local storage.Now, when a user clicks the "Continue with Google" button, they'll be redirected to the Google OAuth page to select their account. After authentication, they'll be redirected back to your Bubble app, and their name will be displayed on the "Login" page using the authenticated token from Xano.
Remember to replace any placeholders (like [token]) with the appropriate dynamic data values, and feel free to customize the UI and workflows based on your application's specific requirements.
Join 100,000+ people already building with Xano.
Start today and scale to millions.
Start building for free