Open herchila opened 5 years ago
A simple but working implementation is done by me here https://github.com/karambir/django-oidc-provider
I am using the that package with oidc client: https://github.com/karambir/mozilla-django-oidc
Back-channel logout basically needs to store something to identify session so that clients can also logout on their side. For django it is little bit tricky. I am doing following:
sid
) associated when created. id_token
saved in it.Token
objects associated by that session id and from there all clients are collected with related session ids. The inital RP which called logout and other RPs which do not support backchannel_logout_uri
are excluded from this.id_token
in redis data structure called logged_out_op_tokens
. It does not log out at that time.id_token
saved in it and if that token is also in redis logged_out_op_tokens
, then RP logs out.Above two packages are complete, you just have to implement do_back_channel_logout
function in points 3,4 and add it to OIDC provider setting OIDC_AFTER_END_SESSION_HOOK
Though these are being used at two OPs with medium to high traffic with more than 5 clients each, I think we can find better ways to do back-channel logout with Django. (Also the specs is still not stable and it needs a lot of context on how your user sessions are being managed, so never made PR here)
Hi!
Is there any possibility to implement Back-Channel Logout? https://openid.net/specs/openid-connect-backchannel-1_0.html
Cheers, Hernán