For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: Link an identity to a user

Examples

Link an identity to a user

let session = try await supabase.auth.linkIdentity(
  .google,
  options: OAuthOptions(redirectTo: URL(string: "my-app-scheme://callback")!)
)

Link an identity to a user with custom URL opening logic

let session = try await supabase.auth.linkIdentity(
  .google,
  presenter: ClosurePresenter { url, callbackScheme in
    // custom URL opening logic
    // return the callback URL
    return resultURL
  }
)