fix/prompt-none-login-required #1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/prompt-none-login-required"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A `prompt=none` auth request that cannot be satisfied without user interaction must be reported to the client through its redirect_uri (`error=login_required`, OIDC Core 3.1.2.6). We instead rendered a bare `{"error":"No active session found"}` 400 body, which dead-ends the user in the browser. Forgejo (git.gnous.eu) silently re-authenticates with prompt=none on return visits. Once the ZITADEL session has aged out -- while the `sessions` cookie, which has no maxAge, is still sent -- the user landed on that raw JSON instead of being handed back to Forgejo, which knows how to turn `login_required` into a normal interactive login. Route every prompt=none dead end through CreateCallback with an AuthorizationError, including the no-cookie-at-all case, which used to redirect to /loginname and so put UI on screen for a request that explicitly forbids it. The JSON 400 stays as the last resort for when the API gives us no callback URL: without one there is nowhere safe to send the browser. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>