ssoSilent method

This function uses a hidden iframe to fetch an authorization code from the eSTS.

There are cases where this may not work:

  • Any browser using a form of Intelligent Tracking Prevention.
  • If there is not an established session with the service.

In these cases, the request must be done inside a popup or full frame redirect.

For the cases where interaction is required, you cannot send a request with prompt=none.

If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as your session on the server still exists.

Throws an AuthException on failure.

Implementation

Future<AuthenticationResult> ssoSilent(SsoSilentRequest request) async {
  final response = await _convertMsalPromise<interop.AuthenticationResult>(
      _callJsMethod(() => _jsObject.ssoSilent(request._jsObject)));

  return AuthenticationResult._fromJsObject(response);
}