Firebase Dart Admin Auth SDK
  • Firebase Dart Admin Auth SDK
    • Introduction
    • Getting Started
      • Installation
      • Initialize Firebase
    • User Management
      • Create User With Email and Password
      • Update Current User
      • Sign In With Credential
      • Sign In With Custom Token
      • Sign in with Email Link
      • Sign In Anonymously
      • Sign Out
      • Sign In With Redirect
      • Sign In With Popup
      • Sign in with Phone Number
      • Sign In With Email and Password
    • User Profile & Data
      • Update Profile
      • Get ID Token
      • Get ID Token Result
      • Reload user
      • Delete User
    • Email & Password Actions
      • Apply Action Code
      • Send Email Verification
      • Send Password Reset Email
      • Update Password
      • Verify Before Update Email
      • Verify Password Reset Code
      • Send Password Reset Email
      • Send Sign-in Link To Email
      • Confirm Password Reset
      • Check Action Code
    • Authentication State
      • Before Auth State Changed
      • On ID Token Changed
      • On Auth State Changed
    • Credential Management
      • Is Sign In With Email Link
      • Unlink Provider
      • Link With Credential
      • Fetch Sign In Methods For Email
      • Link With Popup
      • Link With Phone Number
    • Initialization & Configuration
      • Set Persistence
      • Connect Emulator
      • Use Device Language
      • Set Language Code
      • Initialize Recaptcha Config
      • Get Auth
      • Initialize Auth
    • Multi-Factor Authentication
      • Get Multi-Factor Resolver
    • OAuth and Third-party Auth
      • Generate Custom Token
      • Get Redirect Result
      • Revoke Access Token
    • Utility Functions
      • Get Additional User Info
      • Parse Action Code URL
    • Examples and Tutorials
    • Contributing
    • FAQs
Powered by GitBook
On this page
  1. Firebase Dart Admin Auth SDK
  2. Credential Management

Link With Credential

Use the linkWithCredential method to link a new authentication credential (e.g., Google, Facebook) to an existing user account.

Method

final userCredential = await FirebaseApp.firebaseAuth?.linkWithCredential(credential);

Parameters

  • credential (AuthCredential): The authentication credential to link with the existing user account.

Return

  • UserCredential?: Returns a UserCredential object containing the user's information after the new credential has been linked.

This method allows users to link additional authentication providers to their existing accounts, enabling multi-provider sign-in.

PreviousUnlink ProviderNextFetch Sign In Methods For Email

Last updated 9 months ago