processResult static method

Future<void> processResult(
  1. Map<String, String> result
)

Processes the result from an authentication flow.

You can call this manually if you are redirected to the app by an external browser.

This method will complete the authorize method with the result of the authentication flow.

Implementation

static Future<void> processResult(Map<String, String> result) async {
  var r = _requestsByState.remove(result['state']);
  r?.complete(result);

  if (_requestsByState.isEmpty) {
    for (var s in _requestServers.values) {
      await (await s).close();
    }
    _requestServers.clear();
  }
}