validateSession method
The following methods apply to the currently logged in user
Returns bool indicating if this session is valid and has a logged in user.
Implementation
@override
Future<bool> validateSession() async {
final result = await _cognitoPlugin.fetchAuthSession();
if (result.isSignedIn) {
_enqueueEvent(
TokenRefreshEvent(
result.userPoolTokensResult.value.accessToken.encode(),
),
);
return true;
} else {
return false;
}
}