Repository navigation
feat: Add optional issuers check to session authentication - #9
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
Original prompt from madison.packer
|
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Sep 17, 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.
Summary
Android counterpart of workos/workos-kotlin#433: lets callers require the access token's
issclaim to match an allowlist, with no change in behavior when it is not supplied.The check runs after
DefaultJWTProcessor.process()(signature +exp/nbf) on the verified claims, so it is an authenticated issuer check rather than a compare on an unverified payload. Semantics match the Kotlin SDK:issuers/null→ issuer not checked, identical to todayiss in issuers→ accepted; exact, case-sensitive matchissmismatched or absent, orissuersempty →INVALID_JWTissuers?.toList()) so later mutation by the caller has no effectauthenticate()only;refresh()is untouchedWorkOS mints different
issshapes per environment (https://api.workos.com,https://api.workos.com/user_management/<clientId>, custom auth domains), so there is deliberately no default; the KDoc tells callers to pass the exact value(s) their tokens carry.Binary compatibility: the new parameter is added as a separate overload rather than a default argument, so the previously published JVM descriptors
loadSealedSession(String, String)andauthenticateWithSessionCookie(String, String, Continuation)are unchanged (verified withjavap).JwtVerifier(internal) andSessionCookie's constructor are unchanged.Tests:
JwksVerifiernull/match/multi/mismatch/missing-iss/empty-list/snapshot cases against the in-process JWKS server, plus an end-to-endauthenticateWithSessionCookie/loadSealedSessionpass-through../script/cipasses locally (ktlint + 44 session tests).Link to Devin session: https://app.devin.ai/sessions/0ee38e859a9849658a7cdb2d215d89a6
Open in Devin Desktop: https://app.devin.ai/desktop/session/0ee38e859a9849658a7cdb2d215d89a6?variant=devin
Requested by: @m0tzy