revokeToken method
Delete the storaged token. and emit the
AuthenticationStatus.unauthenticated
if authenticationStatus
not is AuthenticationStatus.unauthenticated
This method should be called when the token is no longer valid.
Implementation
Future<void> revokeToken() async {
await _tokenStorage.delete();
if (_authenticationStatus != AuthenticationStatus.unauthenticated) {
_authenticationStatus = AuthenticationStatus.unauthenticated;
_controller.add(_authenticationStatus);
}
}