Skip to content
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

support linkIdentity #256

Closed
johndpope opened this issue Mar 6, 2024 · 1 comment
Closed

support linkIdentity #256

johndpope opened this issue Mar 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@johndpope
Copy link

as per supabase/auth#313

we need similar capabilities in swift / mobile


// assume user is already logged in and authenticated

// link the current user to a google identity
// this works very similar to signInWithOAuth() and will redirect the user to google to complete the oauth flow 
// once the oauth flow has been completed, the user will be redirected back to the app with the identity linked
const { data, error } = await supabase.auth.linkIdentity({ provider: 'google' })

// fetch all identities linked to the current user
const { data: { identities } } = await supabase.auth.getUserIdentities()

const googleIdentity = identities.find(identity => identity.provider === 'google')

// unlink an identity
await supabase.auth.unlinkIdentity(googleIdentity)


@johndpope johndpope added the enhancement New feature or request label Mar 6, 2024
@grdsdev
Copy link
Collaborator

grdsdev commented Mar 7, 2024

Hi @johndpope

Thanks for opening this issue, but it is a duplicate of #193

We're planning to add support for it in the next couple of weeks.

So I'll be closing this in favor of the other one.

@grdsdev grdsdev closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants