Google Login with Supabase

Database & APIs

I'm trying to login implement a google login, but I keep getting a 403 error message from google.

What have you tried so far?
  • Also tried to create a custom action name like this:

// Automatic FlutterFlow imports
import '/backend/schema/enums/enums.dart';
import '/backend/supabase/supabase.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'dart:html' as html;

import 'package:supabase_flutter/supabase_flutter.dart';

final supabase = SupaFlow.client;

const bool kIsWeb = bool.fromEnvironment('dart.library.js_util');

Future signInWithGoogle() async {
  await supabase.auth.signInWithOAuth(
    Provider.google,
    redirectTo: kIsWeb ? null : 'myapp://myapp.com/',
    authScreenLaunchMode: kIsWeb
        ? LaunchMode.platformDefault
        : LaunchMode
            .externalApplication, // Launch the auth screen in a new webview on mobile.
  );
}
Did you check FlutterFlow's Documentation for this topic?
Yes
1 reply