A T
A T

Reputation: 1

Flutter and Supabase Authentication opens email confirmation in web page instead of app

I'm making an app with Flutter and Supabase. First, I wanted to implement a sign-up function, and after signing up, I was able to implement the part where a confirmation email arrives. When I receive the confirmation email and click on the link to authenticate, the screen shown in the photo appears. I want to transition to the app screen like "Your Signup Done" page , but it opens in Chrome.

main.dart

class _MyAppState extends State<MyApp> {
  final supabase = Supabase.instance.client;
  late final Stream<AuthState> authStateChanges;

  @override
  void initState() {
    super.initState();

    authStateChanges = supabase.auth.onAuthStateChange;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Weightloss Squad App',
      debugShowCheckedModeBanner: false,
      theme: ThemeData.light(),
      home: StreamBuilder<AuthState>(
        stream: authStateChanges,
        builder: (context, snapshot) {
          final session = supabase.auth.currentSession;
          if (session != null) {
            return HomeScreen();
          }
          return LoginScreen();
        },
      ),
    );
  }

enter image description here

enter image description here

I check the Supabase setting page but nothing info

Upvotes: 0

Views: 21

Answers (0)

Related Questions