logout method

Future<void> logout()

Log out from this CARP service

Opens a web view to clear cookies and end the session on the Identity Server.

Only use this method if you used authenticate to authenticate.

Implementation

Future<void> logout() async {
  assert(_manager != null, 'Manager not configured. Call configure() first.');

  if (!_manager!.didInit) {
    await initManager();
  }

  await manager!.logout();
  _authEventController.add(AuthEvent.unauthenticated);
  _currentUser = null;
}