login method
Runs the authorization flow (opens the system browser, handles the redirect, exchanges the code for tokens) and persists the result.
Implementation
Future<OneIdAuthResult> login() async {
final message = await guardPlatformCall(
() => _hostApi.authorize(_toMessage(config)),
);
final tokens = _fromMessage(message);
await _storage.save(tokens);
return tokens;
}