Skip to content

Increase max access and refresh token length to 4096 #21

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxdorninger
Copy link

@maxdorninger maxdorninger commented Aug 3, 2025

This PR updates the SQLAlchemyBaseOAuthAccountTable class to increase the maximum length of the access and refresh token fields from 1024 to 4096 chars.
This is necessary because, OAuth2 providers like Authentik generate tokens with an algorithm like RS256. These the access tokens exceed the max length of 1024 chars which leads to errors like these, ultimately blocking the user from logging in.

sqlalchemy.exc.DataError: (psycopg.errors.StringDataRightTruncation) value too long for type character varying(1024)

Related issues:

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