Skip to content

Authentication Failure with Supabase/Google OAuth #101 #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Swetanshu575
Copy link

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_id

GOOGLE_SECRET_KEY=your_secret_key

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.
@Swetanshu575 Swetanshu575 changed the title Update .env.example Authentication Failure with Supabase/Google OAuth #101 Apr 7, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant