Closed anied closed 2 years ago
Hi @anied, thank you for your issue,
We absolutely need to add this feature. @anied , do you have time to try a contribution?
@guillaume-chervet @youf-olivier do you mind if I open a PR for this?
It would be very it would be very nice :)
can you give me contributor permission? I want to open up a branch
Hello. You just have to make a PR from a fork. We can't add you in the contributors because of internal Axa Policies.
But don't worry it's very simple to contribute from a fork.
Hi @anied , very sorry for the delay. You can do it in the latest v5. I close the issue feel free to reopen it. And also thank you for that issue.
Enhancement Request: Allow
logout
to be passed arguments forstate
As near as I can tell, under the hood,
react-oidc
is calling intooidc-client-js
'sUserManager
'ssignoutRedirect
instance method in order to prompt a logout.signoutRedirect
accepts anargs
object, which can include astate
property, which would be forwarded to any URL passed forend_session_endpoint
as a query param.It would be nice if the
logout
method made available via the various packages could be made to acceptargs
(or possibly juststate
) so that it could be passed through toreact-oidc
'ssignoutRedirect
. For instance, in the context variant, changinglogoutCallback
to something like this:and
logoutUser
inoidcServices.ts
to something like this:would enable leveraging of state. That's obviously a rough, not very Typescripty example, but it is the sort of thing I am envisioning.
Being able to pass state through would allow us to take different actions on the way back into the application based on how the user was logged out. For example, we could opt to show a warning on the screen if they were logged out programmatically rather than by user action.