Skip to content

Refresh token text limit #4456

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

Merged
merged 1 commit into from
Apr 5, 2025
Merged

Refresh token text limit #4456

merged 1 commit into from
Apr 5, 2025

Conversation

pablonyx
Copy link
Contributor

@pablonyx pablonyx commented Apr 4, 2025

Description

Fixes https://linear.app/danswer/issue/DAN-1754/access-token-issue

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2025 6:01pm

@pablonyx pablonyx marked this pull request as ready for review April 4, 2025 17:59
@pablonyx pablonyx requested a review from a team as a code owner April 4, 2025 17:59
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.

PR Summary

The PR updates the OAuthAccount model and schema to support larger refresh tokens by switching the refresh_token field to non-nullable Text. This change aligns with the associated migration and raises considerations on record backfill and potential downgrade truncation.

  • Models Update: Updated backend/onyx/db/models.py to add a non-nullable Text field for refresh_token; ensure existing records are handled.
  • Migration Change: Added backend/alembic/versions/cf90764725d8_larger_refresh_tokens.py which alters refresh_token type; consider potential truncation on downgrade.
  • Security Note: Evaluate if similar encryption treatment is needed as implemented for access_token.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@evan-danswer evan-danswer left a comment

Choose a reason for hiding this comment

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

quick comment on why we need this would be good (could just add to the PR description)

@pablonyx pablonyx added this pull request to the merge queue Apr 5, 2025
Merged via the queue into main with commit 0945001 Apr 5, 2025
10 of 12 checks passed
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.

2 participants