unlinkIdentity method

Future<void> unlinkIdentity(
  1. UserIdentity identity
)

Unlinks an identity from a user by deleting it.

The user will no longer be able to sign in with that identity once it's unlinked.

Implementation

Future<void> unlinkIdentity(UserIdentity identity) async {
  await _fetch.request(
    '$_url/user/identities/${identity.identityId}',
    RequestMethodType.delete,
    options: GotrueRequestOptions(
      headers: headers,
      jwt: _currentSession?.accessToken,
    ),
  );
}