-
-
Notifications
You must be signed in to change notification settings - Fork 257
feat(gotrue): Implement linkIdentityWithIdToken
method
#1206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gotrue): Implement linkIdentityWithIdToken
method
#1206
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for the approval. However, this isn’t deployed to production yet. I’ll merge it once it’s deployed. |
@grdsdev @dshukertjr |
- Add linkIdentityWithIdToken method to link identities using ID tokens - Support OAuth providers with ID token verification - Include nonce and access token validation for enhanced security - Emit userUpdated event when identity is successfully linked Closes CLIBS-282
0fd1c34
to
2c0819c
Compare
Pull Request Test Coverage Report for Build 17735587008Details
💛 - Coveralls |
Is this feature available for use in the @supabase/supabase-js client? I would love to use it in my expo react native app on iOS to support users experiencing the app first without enforcing sign in :) |
What kind of change does this PR introduce?
Feature - This PR adds a new linkIdentityWithIdToken method to the GoTrue client for linking identities using ID tokens, and refactors the existing signInWithIdToken method to share common code.
What is the current behavior?
Currently, users can only sign in with ID tokens using the signInWithIdToken method, but there's no way to link additional identities to an existing user account using ID tokens. The signInWithIdToken and any potential identity linking methods would have duplicate code.
What is the new behavior?
Key Features:
Additional context
This implementation follows the same pattern as the existing signInWithIdToken method but adds the link_identity flag for identity linking functionality. The refactoring improves code maintainability by eliminating duplication while preserving all existing functionality.
The changes are minimal and focused, affecting only the GoTrue client authentication methods without any breaking changes to the public API.
Reference PR: supabase/auth-js#1096
Close #1111
Close #1200