Skip to content

Android/iOS deeplink not working due to URI fragment #3

@nstrelow

Description

@nstrelow

I am super excited to see a dedicated flutter package for Supabase! Kudos for that 👏

Has anyone gotten deeplinks to work on Android and iOS @phamhieu ?
I report this, expecting it not to work. Should it somehow work for you, I will be glad to scrutinize a working example until I get mine to work.

I just can't deeplinks to work on Android (and iOS probably as well). I came across this bug in April, when I tried to enable the deeplink logins with Supabase.

There is a bug inside Flutter, where it ignores the URI fragment, which Supabase uses by design choice, e.g. my-url.com?queryParam=unrelatedToSupabase#accessToken=...

Everything after the URI fragment (#, also called anchor) gets cut from the deeplink URL.

Here is the related issue: flutter/flutter#80666
and PR that hopefully fixes it: flutter/engine#26185

On web everything should be working and I am using it for my project daily 💯

Steps to reproduce:

  1. Configure Deeplinks
  2. Set deeplink (might be required) in Android App Info
  3. Correctly configure redirect URLs
  4. Login with Gitlab or similar
  5. App reopens via deeplink
  6. Doesn't have accessToken

Debug log:

I/flutter ( 5229): onReceivedAuthDeeplink uri: https://studyu-designer.codemagic.app/#/%23access_token=...
I/flutter ( 5229): ***** onErrorAuthenticating: No access_token detected.

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