Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ajworkos
Copy link
Contributor

@ajworkos ajworkos commented Nov 4, 2025

Description

Adds widgets:api-keys:manage scope

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@ajworkos ajworkos requested a review from a team as a code owner November 4, 2025 23:31
@ajworkos ajworkos requested a review from mthadley November 4, 2025 23:31
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 WidgetScope type definition to include the new widgets:api-keys:manage scope 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
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ajworkos ajworkos merged commit 1a35eca into main Nov 4, 2025
5 checks passed
@ajworkos ajworkos deleted the api-keys-scope branch November 4, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants