Dart Reference v2.0

Link an identity to a user

Links an oauth identity to an existing user. This method supports the PKCE flow.

  • The Enable Manual Linking option must be enabled from your project's authentication settings.
  • The user needs to be signed in to call linkIdentity().
  • If the candidate identity is already linked to the existing user or another user, linkIdentity() will fail.
Parameters
    provider
    REQUIRED
    OAuthProvider

    The provider to link the identity to.

    redirectTo
    Optional
    String

    The URL to redirect the user to after they sign in with the third-party provider.

    scopes
    Optional
    String

    A list of scopes to request from the third-party provider.

    authScreenLaunchMode
    Optional
    LaunchMode

    The launch mode for the auth screen. Defaults to LaunchMode.platformDefault.

    queryParams
    Optional
    Map<String, String>

    Additional query parameters to be passed to the OAuth flow.