isAuthorized property

Future<bool> get isAuthorized

Whether the user is fully authorized (has header, JWT, and refresh token).

Returns true only if all three conditions are met:

  • Authorization header is set
  • JWT exists in storage
  • Refresh token exists in storage

Implementation

Future<bool> get isAuthorized async =>
    await containsAuthorizationHeader &&
    await containsJwtInStorage &&
    await containsRefreshTokenInStorage;