authentication property
Future<IGoogleSignInAuthentication>
get
authentication
Retrieve IGoogleSignInAuthentication for this account.
shouldRecoverAuth
sets whether to attempt to recover authentication if
user action is needed. If an attempt to recover authentication fails a
PlatformException
is thrown with possible error code
kFailedToRecoverAuthError
.
Otherwise, if shouldRecoverAuth
is false and the authentication can be
recovered by user action a PlatformException
is thrown with error code
kUserRecoverableAuthError
.
Implementation
Future<IGoogleSignInAuthentication> get authentication async {
if (currentUser != this) {
throw StateError('User is no longer signed in.');
}
final IGoogleSignInTokenData response = await getTokens(
email: email,
shouldRecoverAuth: true,
);
return IGoogleSignInAuthentication(response);
}