0

I have a Flutter app that is using Supabase authentication. The app has web and Android versions.

When it comes to the reset Supabase password feature, I can get this to work for web, but not for Android.

In my AndroidManifest.xml

  <intent-filter android:autoVerify="true">
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="com.eis.goodday" />
  </intent-filter>

For the resetPassword call to Supabase I'm using:

await Supabase.instance.client.auth.resetPasswordForEmail(anEmail,redirectTo: kIsWeb ? 'https://eisgd.com' : 'com.eis.goodday');

However, inside the advisory email when I click on the 'Reset password' link this ends up opening a browser window rather than redirecting to my Android app.

A couple of questions:

  • What URL should I use for the redirect for my Android app?
  • Can I get this feature to work on an Android without deep linking?

TIA

1 Answer 1

0

I got this working by adding a 'host' element to the manifest.xml file

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="com.eis.goodday" android:host="update-password"/>
</intent-filter>



.. and then changing the redirect URL to: com.eis.goodday://update-password/'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.