Spike: Revert ROPC, restore Auth Code flow with Keycloak theme + ASWebAuthenticationSession #159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Spike
Lineage
Supersedes #157 (Direct Access Grants rewrite, PR #158 merged but NOT deployed -- tofu apply not run, prod still on OmniAuth). Corrects the correction: the original Auth Code flow (PR #134/#135) was architecturally correct, it just had UX bugs. ROPC is deprecated in OAuth 2.1 (RFC 9700) and should not be used for end-user auth.
Repo
ldraney/landscaping-assistant+ldraney/pal-e-services(terraform) + turbo-ios Xcode projectQuestion
What is the correct implementation path to restore standards-compliant auth (Authorization Code + PKCE) with good mobile UX? Specifically: (1) revert PR #158 or re-implement? (2) minimum viable Keycloak login theme, (3) ASWebAuthenticationSession wiring in turbo-ios, (4) how to handle the OmniAuth POST redirect bug from PR #151, (5) should terraform PR #106 (direct_access_grants_enabled) be reverted?
Time-box
4 hours
Context
PR #158 replaced OmniAuth (Authorization Code + PKCE) with ROPC Direct Access Grants because the Keycloak redirect UX was bad -- users saw Keycloak's default grey login page. But ROPC is the wrong fix:
keycloak-setup.mdanalysis was correct -- the spike agent (#132) already identified these issuesThe real solution to the UX problem:
Spike Questions
turbo-ioshave built-in auth session support, or do we need a customWKNavigationDelegate? How does the callback URL work?direct_access_grants_enabled = true-- should we revert that too, or leave it enabled for potential admin/API use?session[:user]state.Deliverables
Constraints
tofu applyfor PR #106 -- keep direct_access_grants disabled in prodChecklist
Related
ldraney/landscaping-assistant #157-- Direct Access Grants (superseded by this spike)ldraney/landscaping-assistant #132-- original spike that correctly recommended Auth Codeldraney/landscaping-assistant #158-- ROPC PR (merged, not deployed)ldraney/pal-e-services #106-- terraform enabling direct_access_grants (merged, not applied)docs/keycloak-setup.md-- existing analysisScope Review: NEEDS_REFINEMENT
Review note:
review-1382-2026-06-07Spike scope is well-written with thorough context, clear questions, and concrete deliverables. Template completeness is strong. Three traceability gaps need addressing before moving to next_up:
story:authlabel is used by 15+ board items but no "auth" user story entry exists onproject-landscaping-assistantuser-stories section. Create the backing user story.arch:rails-applabel has no backing architecture note in pal-e-docs. Createarch-rails-app.arch:ioslabel has no backing architecture note in pal-e-docs. Createarch-ios.