Skip to content

Conversation

@p7996619
Copy link
Contributor

@p7996619 p7996619 commented Jul 8, 2025

Currently, when using OpenID-Connect for authentication, logging out does not redirect to the authentication provider. Hence, the user is not actually logged out. On page reload the user is directly logged in again as the cookie still exists.
In some cases this might be desired behaviour, but I assume more often than not it is expected to log out the user at the external auth provider. This can be easily achieved though by manually setting the ACCOUNT_LOGOUT_REDIRECT_URL value to the absolute URL of the auth provider logout endpoint. Example for Keycloak:

https://oauth.internal/realms/master/protocol/openid-connect/logout?post_logout_redirect_uri=/accounts/login/?loggedout=1&client_id=yam.internal

Ideally, django-allauth would parse and use this endpoint automatically from the OpenID discovery endpoint, but this doesn't seem to be implemented right now. see https://codeberg.org/allauth/django-allauth/issues/3104

@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.33%. Comparing base (2d68055) to head (3960ac6).
⚠️ Report is 23 commits behind head on dev.

Files with missing lines Patch % Lines
src/config/settings.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #708      +/-   ##
==========================================
- Coverage   84.34%   84.33%   -0.02%     
==========================================
  Files          66       66              
  Lines        6139     6140       +1     
==========================================
  Hits         5178     5178              
- Misses        961      962       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FuzzyGrim FuzzyGrim merged commit 84ab770 into FuzzyGrim:dev Jul 25, 2025
8 checks passed
@FuzzyGrim
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants