© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
2 replies
kgni

Forgot password flow with OTP in React Native

Hi guys!

I have a forgot password flow as follows:

1. User inputs email
2. OTP is send to the users email
3. User inputs OTP and is redirected to reset the password
4. User updates email

When using the verifyOtp method in step 3, the user session is set and the user is logged in - this is expected and makes sense.

However my issue is, that If the user decides to kill the app after verifying with the OTP in step 3, but before actually updating the password in step 4, then the user will be logged into the app again without resetting the password.

I'm not sure what the typical behaviour is, but I would assume that if the user kills the app before updating the password, then they shouldn't just be automatically logged in again.

How would you guys approach this in the best way? Is it even needed, or am I overthinking it? I guess it is a slight edge case, but I could still see this happening. Maybe it is not that bad after all?

My initial though to "fix" this, was to have a flag on the user
hasResetPassword
hasResetPassword
, and set this to false after the OTP, and then true if they actually changed the password.

Then if this is false, the user session would automatically be terminated the next time the user opens the app.

Would love to hear your ideas, or if anyone dealt with this issue before.

Thanks in advance and happy holidays!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Implementing Forgot Password with Supabase in React Native + Expo
SupabaseSSupabase / help-and-questions
14mo ago
React native password reset
SupabaseSSupabase / help-and-questions
4y ago
User Flow (Sign Up , Sign in , Reset/Forgot Password)
SupabaseSSupabase / help-and-questions
2mo ago
OTP Password & Lovable
SupabaseSSupabase / help-and-questions
3mo ago