Merged
Conversation
Contributor
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
Adds widgets:api-keys:manage scope to the WidgetScope union type, enabling API key management functionality for widgets.
Changes:
- Extended the
WidgetScopetype definition to include the newwidgets:api-keys:managescope alongside existing scopes for users-table, SSO, and domain verification - Fixed trailing comma formatting in the type definition
Assessment:
- No functional issues identified
- Change is consistent with the existing scope naming pattern
- Type-safe implementation using TypeScript union types
- No security concerns related to custom instructions
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The change is a simple, additive modification to a TypeScript union type that adds a new widget scope. No logic changes, no security concerns, and follows the existing pattern perfectly
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| src/widgets/interfaces/get-token.ts | 5/5 | Added widgets:api-keys:manage scope to the WidgetScope union type |
Sequence Diagram
sequenceDiagram
participant Client
participant Widgets
participant WorkOS API
Client->>Widgets: getToken({organizationId, userId, scopes: ['widgets:api-keys:manage']})
Widgets->>Widgets: serializeGetTokenOptions()
Widgets->>WorkOS API: POST /widgets/token
WorkOS API-->>Widgets: {token: "..."}
Widgets->>Widgets: deserializeGetTokenResponse()
Widgets-->>Client: return token string
1 file reviewed, no comments
nholden
approved these changes
Nov 4, 2025
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.
Description
Adds
widgets:api-keys:managescopeDocumentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.