Skip to content

Deeplink doesn't work after clicking the confirm link #1197

Open
@wy0464

Description

@wy0464

Describe the bug
I call supabase.auth.resetPasswordForEmail(email, redirectTo: 'shu-dong://callback/reset-password') I receive the email and the reset link looks correct.
On web, everything works — I see both GET /auth/v1/verify and POST /auth/v1/token in Supabase logs, and I can see flutter: supabase.supabase_flutter: INFO: handle deeplink uri on the console
On mobile, when I tap the link:
I see GET /auth/v1/verify in the logs, but no POST /auth/v1/token
The browser redirects to https://soagwhijqlxwdsnvzzor.supabase.co/auth/v1/verify?token=pkce_d0095...=recovery&redirect_to=shu-dong://callback/reset-password , but nothing happens after that.
My app is not opened, and flutter: supabase.supabase_flutter: INFO: handle deeplink uri not appear
AndroidManifest.xml set up:
`

      <meta-data
            android:name="flutter_deeplinking_enabled"
            android:value="true" />


       <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="shu-dong" android:host="callback"/>
        </intent-filter>`

supabase dashbord Redirect URLs:
shu-dong://callback/*
my main.dart
`

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Supabase.initialize(
    url: MY_URL,
    anonKey: MY_KEY,
    debug: true,
  );
  await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
  runApp(const MyApp());
}`

I‘ve tried to add authFlowType: AuthFlowType. implicit, ), deeplink still did not work on mobile

Expected behavior
I expeect that my app opened after click confirm link in the email.

Version (please complete the following information):
Flutter SDK 3.32.5
shu_dong 1.0.0+1

│ ├── supabase 2.8.0
│ │ ├── functions_client 2.4.3
│ │ ├── gotrue 2.13.0
│ │ ├── postgrest 2.4.2
│ │ ├── realtime_client 2.5.1
│ │ ├── storage_client 2.4.0
├── go_router 15.2.3
├── supabase_flutter 2.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions