Flet app for Supabase account management: unable to reset password for already registered email #5456
Unanswered
cornelius080
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I developed a simple authentication UI (login, registration, and password reset) for a Flet app using Supabase as the backend for user management. The app entry point is the main function which sets up the Supabase client, creates page/view instances, and configures routing.
The app starts on the registration page. Users can register or log in. If registration is valid, users are conducted to the login page. After login, users see the main page and can log out. In the login page, users can also reset their account password: the class implements a simple UI with a TextField to insert the email and a button for being redirected to the update password page. Note the redirect argument in the reset_password_for_email() method. I have to specify that I added this redirect URL in the authorized redirect URLs of my Supabase account.
Finally, the UpdatePasswordPage class features a simple UI that displays a text message, regardless of whether the token is successfully recognized or not.
Even if I set the port with
I must run the app with this command:
which ensures to run it as a web page with the correct predefined port. The problem is concerned with the redirect phase. Once the user, in the login page, clicks on the reset password, the update password page appears for less than a second (actually I saw only the URL change) and I am redirected immediately to the first page (the registration page) without any error or exception. It seems that I am not authorized to access the update page. Moreover, I verify that the token send by email is correctly extracted from the URL (print it in the console). What I am missing?
Code sample
Error message
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions