Authentication Failure with Supabase/Google OAuth #101#102
Open
Swetanshu575 wants to merge 5 commits intoAOSSIE-Org:mainfrom
Open
Authentication Failure with Supabase/Google OAuth #101#102Swetanshu575 wants to merge 5 commits intoAOSSIE-Org:mainfrom
Swetanshu575 wants to merge 5 commits intoAOSSIE-Org:mainfrom
Conversation
File is uptodated with google Web client alues match what’s in your Supabase Dashboard (Project Settings > API) and Google Cloud Console (APIs & Services > Credentials). In the Supabase Dashboard, go to Authentication > Providers, ensure Google is enabled, and confirm the Client ID and Secret are correct. Check the redirect URI in Google Cloud Console. It should be https://your-project-id.supabase.co/auth/v1/callback.
The specific issue we discussed earlier was a Widget Build Error related to ScaffoldMessenger.of(context) not finding a ScaffoldMessenger widget in the widget tree, often because the context used doesn’t have a Scaffold ancestor. In the code you shared, I notice the following:
Use of ScaffoldMessengerKey
In the MyApp widget, you’re using a GlobalKey for the ScaffoldMessenger:
dart
return MaterialApp(
scaffoldMessengerKey: SnackbarService.scaffoldMessengerKey,
debugShowCheckedModeBanner: false,
title: 'Patient App',
theme: AppTheme.lightTheme(),
home: const SplashScreen());
This is a good approach! By using a GlobalKey<ScaffoldMessengerState> (likely defined in snackbar_service.dart), you can show SnackBars anywhere in the app without worrying about the context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
File is uptodated with google Web client alues match what’s in your Supabase Dashboard (Project Settings > API) and Google Cloud Console (APIs & Services > Credentials).
In the Supabase Dashboard, go to Authentication > Providers, ensure Google is enabled, and confirm the Client ID and Secret are correct.
Check the redirect URI in Google Cloud Console. It should be https://your-project-id.supabase.co/auth/v1/callback.
Closes #
📝 Description
added the key to store google api in .env in supabase which was misssing in the file
🔧 Changes Made
just added two line in ENV file GOOGLE_WEB_CLIENT_ID=your_web_client_idGOOGLE_SECRET_KEY=your_secret_key