Skip to content

Conversation

@znarf
Copy link
Member

@znarf znarf commented Oct 14, 2025

No description provided.

@znarf znarf requested a review from Copilot October 14, 2025 15:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements refresh token handling for OAuth authentication by updating the data model to use more consistent naming and adding support for refresh token grants.

  • Renamed the client association to application throughout the codebase for consistency
  • Added refresh token support to OAuth grant types
  • Updated the token response to include refresh tokens for clients

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/routes.ts Updated to use application instead of client for token validation
server/models/index.ts Changed association alias from client to application
server/models/UserToken.ts Added application property and updated default scope
server/models/Application.ts Changed data type from JSON to Record<string, unknown>
server/lib/oauth/model.ts Added refresh token grant type and helper function for token conversion
server/lib/oauth/index.ts Modified token handler to include refresh tokens in response
server/graphql/v2/object/Individual.ts Updated to use application instead of client
server/graphql/v2/object/Application.js Updated to use application instead of client
server/graphql/v2/mutation/OAuthAuthorizationMutations.js Updated to use application instead of client

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

declare public user?: NonAttribute<User>;
declare public application?: NonAttribute<Application>;

declare public client?: NonAttribute<OAuth2Server.Client>;
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

The client property declaration should be removed since it's been replaced by the application property. Keeping both could lead to confusion and inconsistent usage.

Suggested change
declare public client?: NonAttribute<OAuth2Server.Client>;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant