oidc-client-js icon indicating copy to clipboard operation
oidc-client-js copied to clipboard

signOutRedirect should not use extraQuerParameters

Open thorstenfleischmann opened this issue 6 years ago • 2 comments

After updating to >=1.7 the signOutRedirect does not work anymore with our IdP. The reason is that the extraQueryParams (which we used to add a parameter to our authorization request) are also added to the end session endpoint url after the update. Our IdP fails schema validation because it does not allow the extraQueryParamter at the end session endpoint. According to documentation the extraQueryParams only affects the authorization request.

Bug or feature? What can I do to add the parameter only at the authorization endpoint? https://github.com/IdentityModel/oidc-client-js/pull/738

thorstenfleischmann avatar Nov 14 '19 14:11 thorstenfleischmann

The signoutRedirect and signinRedirect methods accept an argument object that you can use to pass extraQueryParams to them individually instead of through the UserManager settings.

signinRedirect Method this.UserManager.signinRedirect({extraQueryParams: {foo: 'bar'}})

signoutRedirect Method this.UserManager.signoutRedirect({extraQueryParams: {TargetResource: 'https://yourdomain.com/logout-callback', InErrorResource: 'https://yourdomain.com/logout-callback'}})

dustin-page avatar Apr 28 '20 18:04 dustin-page

Yea, I guess we'd need to split those out in a future version. Sorry

brockallen avatar Jul 21 '20 21:07 brockallen