-
Notifications
You must be signed in to change notification settings - Fork 46k
Update linear oauth to use refresh tokens #10998
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: dev
Are you sure you want to change the base?
Update linear oauth to use refresh tokens #10998
Conversation
Co-authored-by: nicholas.tindle <[email protected]>
Cursor Agent can help with this pull request. Just |
This PR targets the Automatically setting the base branch to |
✅ Deploy Preview for auto-gpt-docs canceled.
|
Here's the code health analysis summary for commits Analysis Summary
|
Thank you for the detailed PR implementing Linear's OAuth refresh token system ahead of their 2026 migration deadline! The implementation looks well thought out and thoroughly tested. Here are a few suggestions to improve the PR:
Overall, this is a well-implemented change with good forward planning for Linear's upcoming API changes. The migration path for existing tokens is especially valuable. |
…/keyword_suggestions.py
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
…/related_keywords.py
Thank you for this thorough PR implementing Linear's new OAuth refresh token system! The implementation and documentation are comprehensive and well-organized. The changes look solid, with good handling for both new tokens and migration of existing long-lived tokens. I particularly appreciate the detailed documentation file explaining the implementation details and migration strategy. One small issue: Your PR title doesn't follow our conventional commit format. It should include a type and scope, like:
Or:
Please update the title to follow this format before merging. Everything else looks great! |
Thank you for this well-documented PR implementing the Linear OAuth refresh token update. Your detailed description and implementation look thorough and well-tested. One thing to address:
Your PR is otherwise well-structured with excellent documentation and clear implementation of the refresh token support. The new documentation file and code changes are comprehensive and thoughtfully address the migration path for existing tokens. |
@claude does this do what needs to happen |
Claude finished @ntindle's task —— View job Reviewing Linear OAuth refresh token implementation...Todo List:
Review Summary: ✅ Yes, this implementation does what needs to happenYour PR successfully implements Linear's new OAuth refresh token system with excellent backward compatibility and migration support. The implementation meets all the requirements for the April 2026 deadline. What the implementation does correctly:1. Refresh Token Support ✅
2. Token Migration Path ✅
3. Token Lifecycle Management ✅
4. Error Handling ✅
5. OAuth Flow Compliance ✅
Minor Observations (not issues):
Verification Checklist:
This is a well-architected implementation that proactively addresses Linear's upcoming changes while ensuring a smooth transition for existing users. The automatic migration approach is particularly thoughtful, as it will upgrade tokens transparently without requiring user intervention. |
…refresh-tokens-e0b5
❌ PR-Agent failed to apply 'global' repo settings The configuration file needs to be a valid TOML, please fix it. Error message: Configuration content:[pr_description]
enable_help_text=false
[pr_reviewer]
enable_review_labels_effort = true
enable_auto_approval = false
maximal_review_effort = 3
enable_help_text=false
num_code_suggestions=0
[github_app]
pr_commands = [
"/review --pr_reviewer.num_code_suggestions=0",
]
[pr_code_suggestions]
commitable_code_suggestions=false
num_code_suggestions=0
rank_suggestions=true
enable_help_text=false
suggestions_score_threshold=8
[checks] # /checks (pro feature) #
enable_auto_checks_feedback=false
persistent_comment=false
enable_help_text=false |
❌ PR-Agent failed to apply 'local' repo settings The configuration file needs to be a valid TOML, please fix it. Error message: Configuration content:[pr_reviewer]
num_code_suggestions=0
[pr_code_suggestions]
commitable_code_suggestions=false
num_code_suggestions=0
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
@claude run the linters |
Claude finished @ntindle's task —— View job ✅ Linters run successfully!Todo List:
Summary:Successfully ran Python linters and formatters on the PR. The following formatting improvements were applied to
All linting checks now pass! The changes have been committed and pushed to the branch. View job | |
Applied Black and isort formatting to clean up code style: - Removed trailing whitespace - Improved line breaking for better readability - Fixed conditional expression formatting Co-authored-by: Nicholas Tindle <[email protected]>
…refresh-tokens-e0b5
…/keyword_suggestions.py
…/related_keywords.py
Thanks for this comprehensive PR implementing Linear's new OAuth token refresh system! The implementation looks thorough and well-documented. One issue to address:
The code changes themselves look good - I appreciate the thorough implementation of both the refresh flow and the migration path for existing tokens. The buffer for token expiration and the detailed error handling will help ensure a smooth user experience with this integration. |
Thank you for submitting this PR to update Linear's OAuth implementation with refresh token support. The code changes are well-structured and thoroughly documented. I have one required change before this can be merged:
Your PR description and changes are excellent - clearly explaining the need, the implementation details, and providing a thorough test plan. The code changes themselves look well-implemented with proper error handling and support for both old and new token types. Once you update the PR title, this should be ready for approval. |
Thank you for this detailed PR implementing Linear's new OAuth token refresh system. The code changes look comprehensive and well-tested. One item needs to be addressed before merging:
Your implementation looks solid, with good handling of token migration, refresh logic, and error cases. I especially like the approach for maintaining backward compatibility during the transition period. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Need 💡
This PR addresses Linear issue SECRT-1665, which mandates an update to Linear's OAuth2 implementation. Linear is transitioning from long-lived access tokens to short-lived access tokens with refresh tokens, with a deadline of April 1, 2026. This change is crucial to ensure continued integration with Linear and to support their new token management system, including a migration path for existing long-lived tokens.
Changes 🏗️
autogpt_platform/backend/backend/blocks/linear/_oauth.py
:migrate_old_token()
method to exchange old long-lived access tokens for new short-lived tokens with refresh tokens using Linear's/oauth/migrate_old_token
endpoint.get_access_token()
to automatically detect and attempt migration for old tokens, and to refresh short-lived tokens when they expire._request_tokens
to handle both authorization code and refresh token flows, supporting Linear's recommended authentication methods.autogpt_platform/backend/backend/blocks/linear/_config.py
:TEST_CREDENTIALS_OAUTH
mock data to include realisticaccess_token_expires_at
andrefresh_token
for testing the new token lifecycle.LINEAR_OAUTH_IMPLEMENTATION.md
:Checklist 📋
For code changes:
For configuration changes:
.env.default
is updated or already compatible with my changesdocker-compose.yml
is updated or already compatible with my changesLinear Issue: SECRT-1665