clearToken method

Future<void> clearToken()

Clears tokens from local storage and memory.

Implementation

Future<void> clearToken() async {
  final prefs = await SharedPreferences.getInstance();
  await prefs.remove('access_token');
  await prefs.remove('refresh_token');
  await prefs.remove('expires_at');
  await prefs.remove('client_id');
  _accessToken = null;
}