Conversation
This was referenced Jul 6, 2026
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.
Context
Simplify identity gem to a shared JWT session cookie, rely on jwt not json-jwt.
etm_sessioncookie as JWT:Replaces
Identity::Session/AccessToken/InvalidGrantRecovery/Serializerand the silent-SSO probe (routes remain, but?prompt=none,silent.html.erb, and the hint-cookie helpers are gone) with a singleIdentity::ResourceServerconcern plus a unified session_cookie_token/claims-to-User path (Identity::User.from_jwt_claims).Rewrites
TokenDecoderon the jwt gem (native JWKS loader with kid rotation) instead of the previous custom json-jwt implementation; it now returns aHashWithIndifferentAccessof claims rather than a plain Hash, so downstream consumers can read claims by string or symbol key.Controller helpers and error handling etc were trimmed down to what is actually necessary under this cookie-JWT approach
the two independent "claims → User" mappers have been unified into one (Identity::User.from_jwt_claims), and the two independent token-extraction paths (API bearer vs. browser cookie) onto one shared cookie reader.
Quirks / notes:
access_tokenpassthrough that is only used by etmodel - the routes should rely on the cookie JWT only. At the moment this is used in three places, theapi_passthru_controller,co2_factsheet_optionsandapplication_helper's boot-payload token. I did not change these as part of this effort as the scope was beginning to sprawl...Related - Goes with the other SSO: Login/Logout PRs:
identity rails
etengine
etmodel
myetm
collections
ETLauncher
Checklist