From b5e7b1a6a564f52301c4a179e33125b60464a434 Mon Sep 17 00:00:00 2001 From: Maximilian Dorninger <97409287+maxdorninger@users.noreply.github.com> Date: Sun, 3 Aug 2025 19:20:39 +0200 Subject: [PATCH] Increase max access and refresh token length to 4096 --- fastapi_users_db_sqlalchemy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi_users_db_sqlalchemy/__init__.py b/fastapi_users_db_sqlalchemy/__init__.py index 467a2bf..73fac6b 100644 --- a/fastapi_users_db_sqlalchemy/__init__.py +++ b/fastapi_users_db_sqlalchemy/__init__.py @@ -69,10 +69,10 @@ class SQLAlchemyBaseOAuthAccountTable(Generic[ID]): oauth_name: Mapped[str] = mapped_column( String(length=100), index=True, nullable=False ) - access_token: Mapped[str] = mapped_column(String(length=1024), nullable=False) + access_token: Mapped[str] = mapped_column(String(length=4096), nullable=False) expires_at: Mapped[Optional[int]] = mapped_column(Integer, nullable=True) refresh_token: Mapped[Optional[str]] = mapped_column( - String(length=1024), nullable=True + String(length=4096), nullable=True ) account_id: Mapped[str] = mapped_column( String(length=320), index=True, nullable=False