Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password Reset Link #77

Open
Bimbam360 opened this issue Aug 31, 2024 · 2 comments
Open

Password Reset Link #77

Bimbam360 opened this issue Aug 31, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@Bimbam360
Copy link

Bimbam360 commented Aug 31, 2024

How exactly is the 'Reset Password' supposed to work in Godot when the link generated is seemingly expected to direct to a web server?

I have created a mobile game and am trying to use SupaBase to support community login/leaderboard and content sharing functions. Do I have to set up a web server separately to enable the ability to reset a password or can Deep Linking be achieved?

@Bimbam360 Bimbam360 added the documentation Improvements or additions to documentation label Aug 31, 2024
@praisethemoon
Copy link

praisethemoon commented Aug 31, 2024

Hi there,

Speaking from my own personal experience here.

I got no clue what deep linking is, so i am just gonna pretend I didn't read that 😂

You have two options:

  1. Setup a web server to respond to those links
  2. Use the OTP to verify users.

In my piano app, i have opted for the second, since my app runs on desktop. But it was configured with self hosted supabase and i was using supabase js API. I am not very familar with godot API as I just got here 😁

Here is how I configured OTP for user verification:

  1. I have UI for users to register, once they do, supabase will send an email and my app will display a popup asking for 6 digits token
  2. I have created a custom email template that shows only the OTP and doesn't display the link at all. Supabase exposes various arguments, have a look here: https://supabase.com/docs/guides/auth/auth-email-templates especially at {{ .Token }} which will be replaced with the 6 digit OTP.
  3. Once users fill the popup with the 6 digits, all what is left is await supabase.auth.verifyOtp({ email, token, type: "signup" }) JS API and there you have it. It is the same process when changing email.

This process is sadly not properly documented within supabase.

Hope it helps!

How email with OTP should look like Screenshot 2024-08-31 at 18 59 35

@Bimbam360
Copy link
Author

Super helpful! I was thinking OTP could be used but it was unclear how to do it so this is great.

This should be more apparent in the docs somewhere though, so leaving this open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants