goauthentik / goauthentik/authentik
OIDC backchannel logout follows redirects
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 651
Description
### Describe the bug
The OIDC spec for the back channel logout says the response code for a request can be `200`, `204`, or `400`.
However if the response code is `301` with a `Location` header it will follow this redirect.
The spec doesn't explicitly disallow following redirects, but it feels wrong to do so. Since this would turn a POST request into a GET request.
The spec also doesn't explicitly allow following redirects.
[Spec](https://openid.net/specs/openid-connect-backchannel-1_0.html#BCResponse)
### How to reproduce
1. Create an OIDC connect provider + application.
2. Setup an app that uses this OIDC application, create a backchannel logout route that returns a `301` redirect.
3. Setup a backchannel logout url in the provider.
4. Log into the application
5. Log out of the main Authentik dashboard to trigger a backchannel logout.
6. Authentik will follow the redirect.
### Expected behavior
The backchannel logout task call should be marked as having an error and not follow the redirect.
### Screenshots
_No response_
### Additional context
_No response_
### Deployment Method
Docker
### Version
2025.10.3
### Relevant log output
```shell
```
Contributor guide
Assessment
This issue has not been assessed yet.