isAuthenticated method

Future<bool> isAuthenticated()

Checks if user is currently authenticated

Implementation

Future<bool> isAuthenticated() async {
  if (_currentTokens == null) {
    await _loadStoredTokens();
  }

  return _currentTokens != null && !_currentTokens!.isExpired;
}