fix(auth): let the Lens signed-out page reach the central account - #26
Merged
Merged
Conversation
TLDR Signing out of Lens ends only the Lens session; the central Auth session that signs users into every Elcano app keeps going, and the next click on Lens silently signs them back in. The signed-out page now links to the central account page, where that session can actually be ended. Explorer's signed-out page already does this; Lens's did not. Problem /signed-out rendered "Sign in again" and nothing else. In central mode a user who wanted to stop being signed in (shared machine, leaving for the day) had no path from Lens to Auth's /account page, which holds the only logout form for the central session. The comment on the route said the page was "provider-free", so nobody had wired the link. Fix - The route passes account_url to the template: the Auth issuer's /account in central mode, the configured login URL in Elcano mode (Elcano-mode logout never lands here, but the template must not render a broken link if it does). - The template gains a secondary "Manage your central account" link under the sign-in button, matching Explorer's wording. The page stays public and reads no identity; it only reads deployment config. Tests - test_central_logout_stays_signed_out_until_the_user_chooses_to_sign_in now asserts the rendered page links to http://auth.example.com/account (fails before, passes after). - ruff check, ruff format --check, and the full suite (333 passed, 1 skipped) are green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Signing out of Lens ends only the Lens session; the central Auth session that signs users into every Elcano app keeps going, and the next click on Lens silently signs them back in. The signed-out page now links to the central account page, where that session can actually be ended. Explorer's signed-out page already does this; Lens's did not.
Problem
/signed-outrendered "Sign in again" and nothing else. In central mode a user who wanted to stop being signed in (shared machine, leaving for the day) had no path from Lens to Auth's/accountpage, which holds the only logout form for the central session. The comment on the route said the page was "provider-free", so nobody had wired the link.Fix
account_urlto the template: the Auth issuer's/accountin central mode, the configured login URL in Elcano mode (Elcano-mode logout never lands here, but the template must not render a broken link if it does).Tests
test_central_logout_stays_signed_out_until_the_user_chooses_to_sign_innow asserts the rendered page links tohttp://auth.example.com/account(fails before, passes after).ruff check,ruff format --check, and the full suite (333 passed, 1 skipped) are green.