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.

Last updated