-
-
Couldn't load subscription status.
- Fork 288
Implement refresh tokens handling #11139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
clientassociation toapplicationthroughout 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>; |
Copilot
AI
Oct 14, 2025
There was a problem hiding this comment.
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.
| declare public client?: NonAttribute<OAuth2Server.Client>; |
No description provided.