Skip to content

fix(admin): generateLink email_change_new hashed_token must match stored token (fixes #2538) - #2716

Open
deepshekhardas wants to merge 4 commits into
supabase:masterfrom
deepshekhardas:fix/2538-generatelink-hashed-token
Open

fix(admin): generateLink email_change_new hashed_token must match stored token (fixes #2538)#2716
deepshekhardas wants to merge 4 commits into
supabase:masterfrom
deepshekhardas:fix/2538-generatelink-hashed-token

Conversation

@deepshekhardas

Copy link
Copy Markdown

fix(admin): generateLink email_change_new hashed_token must match stored token (fixes #2538)

admin.generateLink({ type: 'email_change_new', ... }) returned a
properties.hashed_token computed from the OLD email
(GenerateTokenHash(params.Email, otp)) while storing
email_change_token_new computed from the NEW email. Consumers using
the response's hashed_token as the verify token silently failed
verifyOtp.

Compute hashedToken from params.NewEmail for the
email_change_new arm so the response matches the stored column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

admin.generateLink(email_change_new): properties.hashed_token diverges from stored email_change_token_new

1 participant