decode method

void decode(
  1. String code,
  2. dynamic callBack
)

Implementation

void decode(String code,callBack) async { //logMsg("Decoding: $code");
  _getClient(kIsWeb ? await _consumeVerifier() : codeVerifier, code).then((client) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    if (client != null) {
      _logMsg("Storing token");
      prefs.setString(fieldToken, client.credentials.accessToken);
    }
    callBack(client);
  });
  authenticating = false;
  if (!kIsWeb) closeInAppWebView();
}