timothymiller / t4-app

A powerful cross-platform UI toolkit for building actually native iOS, Android, macOS, Windows, Linux, and Progressive Web Apps with React (Native).
https://t4stack.com
MIT License
1.34k stars 71 forks source link

[Feature] Supabase password reset #18

Closed albbus-stack closed 1 year ago

albbus-stack commented 1 year ago

I've implemented a simple password reset for supabase. This inclued two new pages /password-reset and /password-reset/update-password respectively to send the password reset email and to update the users password once received the token. I also added a link in /sign-in to the password reset page.

To set it up add a new redirect URL to your supabase dashboard under Authentication > URL Configuration as http://localhost:3000/password-reset/update-password. This is the same url used in auth.ts so in production you wanna change the NEXT_PUBLIC_APP_URL environment variable. I'll document that in the docs once this gets done properly.

Needs some testing for the redirects on all platforms.