Closed anied closed 2 years ago
Hi @anied , thank you for your issue. We will fix it as soon as we can.
Do you still have it in version 4 ? https://www.npmjs.com/package/@axa-fr/react-oidc-context It should work. Very sorry for the delay.
Hi @anied , this is fixed in v5. Very sorry for the delay. I close the issue, feel free to reopen it if you need.
Issue and Steps to Reproduce
When using the react-oidc-context variant of the library, a call to the
logout
function returned from theuseReactOidc()
hook will resolve (as opposed to reject) if the logout fails.To Reproduce
react-oidc-context
POST
to the/revoke
endpoint of our IDP will fail with aERR_NAME_NOT_RESOLVED
error)Versions
react-oidc-core@3.0.9-alpha.0
for bothreact-oidc-context
andreact-oidc-core
Expected
The promise returned from
logout()
will reject, allowing the implementation to handle a failing condition in a.catch()
block.Actual
The promise returned from
logout()
resolves. Because the library logout exited early and there is no opportunity to manually clear the tokens from the UserStore, the application will remain in a logged in state.Please let me know if there is more information needed to help understand this issue. Thanks, love the library.