Supabase Auth // Reset Password // Invalid or Expired Link

Actions & Logic

I'm really struggling to manage the handling of expired password reset links from Supabase.

If the reset link sent by Supabase has been used or has expired, the user is redirected to:

https://........./reset-password#error=access_denied&error_code=403&error_description=Email+link+is+invalid+or+has+expired

What I'm struggling with this 'capturing' the '#error=access_denied&error_code=403&error_description=Email+link+is+invalid+or+has+expired ' part of the redirect URL so I can then conditionally manage it and display a message.

Unfortuantely as Supbase doesn't return the error info as query parameters, it appears really difficult to pickup and use.

Has anyone solved this or how are you handling expired links from Supabase ๐Ÿ™

What have you tried so far?

I've tried a couple of different custom actions that use dart:html (this is a web app only) to try and capture and parse the url (both window.location.href and window.location.hash) but it seems the url just resolves to /reset-password before the onPageLoad actions start (see screenshot of debug console output)

I've also tried adding a page parameter just to see if it get's picked up but (as I expected) it didn't.

Did you check FlutterFlow's Documentation for this topic?
Yes
3
2 replies