FeatureFuel
2

there is not information about email_change_token_new and email_change_token_current

Source: supabase/supabase#27862 · opened by @cenullum
Improve documentation Describe the problem I want to know how to verify both of otps or verify email_change_token_new myself in a rpc function. ![resim]( I was trying to update email with current password and otp sent to new email. Actually first I wanted old and new email otp but I couldnt then tried current password instead of old email otp to change email. I can verify encrypted current password with this code but when I try on email_change_token_new or email_change_token_current I get invalid salt error. CREATE OR REPLACE FUNCTION verify_user_password(password text) RETURNS BOOLEAN SECURITY DEFINER AS $$ BEGIN RETURN EXISTS ( SELECT id FROM auth.users WHERE id = auth.uid() AND encrypted_password = crypt(password::text, auth.users.encrypted_password) ); END; $$ LANGUAGE plpgsql; actually main problem is I couldn't verify_otp both of tokens that sent to new and old emails at same time or one by one ![resim]( that is why I try…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests