goauthentik / goauthentik/authentik
HTTP access to application allowed after session expiration (but websocket connections fail)
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 659
Description
### Describe the bug
Forgive me I am not well versed in making bug reports.
I found a strange issue when using authentik to protect a reverse proxy connection to a 3d printer controlling web page. Normal sign-in prompt works normally, but after that session expires (after 24 hours, or when I delete in admin panel) I can still refresh and navigate to the page (caching disabled), and the page is returned normally, but later when the javascript attempts to connect a websocket, it is refused. It will not go back and prompt for a new sign in fro authentik. If I open a private tab or another browser, it will prompt for sign in and work normally. Also if I clear all the storage associated with that domain, it will then work normally again.
Here is where it gets stranger: I noticed the application is making high speed GET requests for its built-in webcam, and when I closed this webcam window (and stopped the get requests) I cannot trigger this bug. Closing the webcam after this bug is triggered does not make it possible to sign in, I have to clear the browser storage.
It seems like there is a timing issue that the webcam is triggering, perhaps when a request is being dealt with at the exact moment a session is expired, this happens? I imagine creating a toy application to serve a page, and making the page request a resource quickly will exhibit the same issue.
### How to reproduce
1. Setup forward auth (single application) authentication for a local network resource.
2. Navigate to the page (sign in)
3. In the control panel, delete the session.
4. Refresh the page (will serve the page, ws connections will fail, even if not signed in)
### Expected behavior
When refreshing after session is expired, I expect to be bounced back to the authentik sign in screen.
### Screenshots
https://github.com/user-attachments/assets/6c62c82e-71e3-4961-a7e5-d2690592c098
### Additional context
Docker-compose, traefik, 3d printer software is klipper.
We see the behavior on Firewfox, Chrome, and Safari. Both mobile and desktop. Multiple computers and tried different internet connections.
### Deployment Method
Docker
### Version
2025.10.0
### Relevant log output
```shell
```
Contributor guide
Assessment
This issue has not been assessed yet.