handleRedirectCallback method

void handleRedirectCallback(
  1. AuthResponseCallback callback
)

Sets the callback function for the redirect flow.

This callback must be set before acquireTokenRedirect and loginRedirect can be used.

Implementation

void handleRedirectCallback(AuthResponseCallback callback) {
  if (callback == null) throw ArgumentError.notNull('callback');

  void jsCallback(interop.AuthError error, [interop.AuthResponse response]) {
    callback(convertJsAuthError(error), AuthResponse._fromJsObject(response));
  }

  _callJsMethod(
      () => _jsObject.handleRedirectCallback(allowInterop(jsCallback)));
}