generateSignOutUri function

Uri generateSignOutUri({
  1. required String endSessionEndpoint,
  2. required String clientId,
  3. Uri? postLogoutRedirectUri,
})

Generate the sign-out URI (End Session URI).

Implementation

Uri generateSignOutUri({
  required String endSessionEndpoint,
  required String clientId,
  Uri? postLogoutRedirectUri,
}) {
  var signOutUri = Uri.parse(endSessionEndpoint);

  return addQueryParameters(signOutUri, {
    'client_id': clientId,
    'post_logout_redirect_uri': postLogoutRedirectUri?.toString()
  });
}