Add optional issuer config for access token validation - #90
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 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
|
Greptile SummaryAdds optional access-token issuer validation and extends the follow-up implementation to support multiple accepted issuers.
Confidence Score: 5/5The PR appears safe to merge; no outstanding correctness, security, or repository-rule violations were identified. Issuer values resolve through the existing configuration precedence, multiple values are normalized into the form accepted by JWT verification, and the option is applied only when configured. Both previous findings were resolved after Greptile accepted the implementation-context explanations, and neither remains outstanding. Important Files Changed
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Summary
Adds an opt-in
issclaim check to access token verification via a newissuerconfig key (configure({ issuer })orWORKOS_ISSUER, resolved by the existing genericgetConfigenv-var mapping). When set, it is passed tojose.jwtVerify; when unset, behavior is unchanged (noisscheck).issuerisstring | string[]so an app can accept tokens from more than one issuer (e.g. during an issuer migration);jose'sissueroption already accepts both.WORKOS_ISSUERis split on commas inConfiguration.getValue(trimmed, empties dropped; a single value stays a string):Opt-in rather than defaulted because the API does not mint a single issuer shape — it varies by environment (
https://api.workos.comfor legacy environments,https://api.workos.com/user_management/<clientId>for environments created since mid-2025, custom auth domains, and flag-gated path variants). Mirrors workos/authkit-nextjs#476.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