Supabase provides a built-in way to handle password reset token validation using the verifyOtp
method.
const { data, error } = await supabase.auth.verifyOtp({
token: token,
type: 'recovery'
});
Supabase Docs: https://supabase.com/docs/reference/javascript/auth-verifyotp