linkEmailAndPassword method

Future<AuthUserCredentialVO> linkEmailAndPassword({
  1. required String email,
  2. required String password,
})

Links an email/password credential to the current user.

Implementation

Future<AuthUserCredentialVO> linkEmailAndPassword({
  required String email,
  required String password,
}) async {
  try {
    final authCredential = await _authDataService.linkEmailAndPassword(
      email: email,
      password: password,
    );
    final vo = AuthUserCredentialVO.fromAuthUserCredential(authCredential);
    return vo;
  } catch (e) {
    if (e is RdevException) {
      throw AuthServiceException(
          code: e.code, message: e.message, stackTrace: e.stackTrace);
    }
    throw AuthServiceException(
        stackTrace: StackTrace.current, message: e.toString());
  }
}