fix(api): return correct hashed token for email_change_new in adminGenerateLink#2550
Open
Jualhosting wants to merge 3 commits into
Open
fix(api): return correct hashed token for email_change_new in adminGenerateLink#2550Jualhosting wants to merge 3 commits into
Jualhosting wants to merge 3 commits into
Conversation
Resolves supabase#2534 by adding a fallback mechanism in ParseIDToken. When go-jose throws unsupported elliptic curve error, the fallback manually fetches the JWKS and verifies the secp256k1 signature using go-ethereum/golang-jwt ECDSA implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a bug in \�dminGenerateLink\ where generating an action link for type \email_change_new\ returns a \hashed_token\ property derived from the user's old/current email instead of the new email.
Details
When an admin generates an email change link for \email_change_new\ via the \�dminGenerateLink\ handler:
Because of this discrepancy, client applications and SDKs (such as \�dmin.generateLink) receive a hashed token that is incompatible with the one persisted in the database, causing verification or link validation to fail during the change confirmation step.
Fix
Assistance Disclosure
Just a quick heads-up: I used Antigravity (a Gemini-based AI coding assistant) to help track down and patch this hashed token bug. I've thoroughly reviewed and tested the fix to make sure everything is correct.