logout method
Logs out the current user
Implementation
Future<void> logout() async {
try {
// Revoke tokens if available
if (_currentTokens?.accessToken != null) {
await _revokeToken(_currentTokens!.accessToken);
}
} catch (e) {
// Continue with logout even if revocation fails
// In production, you might want to use a proper logging framework
if (config.enableLogging) {
// Token revocation failed, but continue with logout
}
}
// Clear stored data
await _clearStoredData();
_currentTokens = null;
_currentUser = null;
}