🚀 Add Google Sign Up/In
Now, you'll add Google as a sign-in option. This requires a prompt in AI Studio and an important configuration in your Firebase settings.
Optional: upload a Google Logo to Google Cloud Storage and copy its public URL. Learn how to do it here:
https://www.youtube.com/watch?v=k_tykH-vg8s → 3:48
→ In the AI Studio "Code assistant" prompt box, enter the following instructions, pasting your icon's Public URL:
Add sign in/up with Google button using Firebase Authentication. Use this icon for the button: <bucke storage link>
→ Send the prompt. Your app preview will update to show a "Continue with Google" button on the sign-in and sign-up pages.
Authorise Your Deployed App (Critical Step)
Google Sign-In will not work in the AI Studio preview. You must deploy your app and authorize its new URL in Firebase.
→ Click the "Deploy app" icon in the top-right corner of AI Studio.
→ Select your Google Cloud Project and wait for the app to deploy. Learn how to create a project, deploy apps & connect domains in this video:
https://www.youtube.com/watch?v=k_tykH-vg8s → 3:32 - Create a Project
→ 13:59 - Deploy App
→ 14:16 - Publish to a Domain ( for production)
→ When the "App successfully deployed" modal appears, copy the "App URL" (e.g., https://gemini-drive-copy-to-your-drive...run.app).
→ Go back to your Firebase Console tab.
→ Navigate to Authentication > Settings tab.
→ Scroll down to the "Authorised domains" section and click "Add domain".
→ Paste the App URL you just copied and click "Add".
If you have connected a custom domain, add that domain e.g. https://youraicoursehub.online/
Test Google Authentication
→ Open your live app by navigating to the App URL in a new browser tab.
→ Click "Continue with Google".
→ Choose your Google Account from the pop-up window and give it permission.
You will now be successfully logged into your application using your Google Account.