Conversation
Greptile OverviewGreptile SummaryThis PR adds support for multiple user Key changes:
The implementation is clean, consistent with the existing codebase patterns, and properly handles both the presence and absence of the Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant authkitLoader
participant getClaimsFromAccessToken
participant JWT
participant Session
Client->>authkitLoader: Request with session cookie
authkitLoader->>Session: getSessionFromCookie()
Session-->>authkitLoader: Session with accessToken
authkitLoader->>getClaimsFromAccessToken: Extract claims from JWT
getClaimsFromAccessToken->>JWT: decodeJwt(accessToken)
JWT-->>getClaimsFromAccessToken: {sid, org_id, role, roles, permissions, entitlements}
getClaimsFromAccessToken-->>authkitLoader: Claims with roles array
authkitLoader->>authkitLoader: Build AuthorizedData with roles
authkitLoader-->>Client: {user, role, roles, permissions, ...}
|
nicknisi
left a comment
There was a problem hiding this comment.
This looks good! Since Remix is being succeeded by React Router, we'll want to make this change there as well. https://github.com/workos/authkit-react-router
|
Okay great, will make a follow up ticket! |
17f64c5 to
9592ec9
Compare
9592ec9 to
b64b6ac
Compare
|
@nicknisi took a look and it seems this is already supported in the authkit-react-router package. We must have missed remix during initial multiple roles launch. |
For multiple user roles in the session jwt.