Hieu Vu
07/10/2025, 12:07 PMauth.resetPasswordForEmail
auth.resendEmail
In the url in the email, they are always contain code and token_hash value and not one in the Email configuration.
Like
{{ .ConfirmationURL }}?code=694bbb26-8514-4954-8050-113a56b3d53a&token_hash=pkce_231caed315d266012cabccd638753a692b0fc1a3b4c0c3ce31bceb46
And not
{{ .ConfirmationURL }}/?token_hash={{ .TokenHash }}&email={{ .Email }}
So to handle the Reset Password and Sign Up flow, we will specify the redirectUrl and based on redirectUrl to handle with deeplinking. And call:
supabaseAuth.verifyEmailOtp(
type = OtpType.Email.EMAIL,
tokenHash = tokenHash
)
In Reset Password , later I just update user with
auth.updateUser {
password = "secretPassword"
}
Is that correct? I use this for my sign up. Now I am implementing Reset Password flow and was confused if I need to use the code
or token_hash
or both for verificationJan
07/11/2025, 11:47 AMcode
even work?Hieu Vu
07/11/2025, 4:21 PMHieu Vu
07/11/2025, 4:22 PM