0
ElevatedButton(
                    onPressed: () async {
                      
                      if(defaultTargetPlatform == TargetPlatform.android){
                        signInWithGoogle();
                      }

                      if(kIsWeb){
                        final data = await  supabase.auth.signInWithOAuth(Provider.google);
                        
                      }


                    },
                    child: const Text("Google Sign In"),
                  ),

I am able to sign in mobile and while in web i am successfully getting the auth token and i am redirect to http://localhost:44769/#access_token=eyJhbGciOiJIUzI1.....

and i am getting this error show in the screen GoException: no routes for location: access_token=eyJhbGciOiJIUzI1NiIsIm

Hitesh Patel
  • 183
  • 2
  • 12

1 Answers1

0

You can use URL strategy to make it work with Flutter web.

import 'package:flutter_web_plugins/url_strategy.dart';

void main() async {
  usePathUrlStrategy();

  await Supabase.initialize(...);

  runApp(ExampleApp());
}
dshukertjr
  • 15,244
  • 11
  • 57
  • 94