Skip to content

fix: store OAuth expiration timestamps as bigint - #32

Open
MarthalaJagruthiReddy wants to merge 1 commit into
fastapi-users:mainfrom
MarthalaJagruthiReddy:fix/oauth-expires-at-bigint
Open

fix: store OAuth expiration timestamps as bigint#32
MarthalaJagruthiReddy wants to merge 1 commit into
fastapi-users:mainfrom
MarthalaJagruthiReddy:fix/oauth-expires-at-bigint

Conversation

@MarthalaJagruthiReddy

Copy link
Copy Markdown

Fixes fastapi-users/fastapi-users#1296

OAuthAccount.expires_at was mapped to SQL INTEGER, which cannot store valid OAuth expiry timestamps beyond the signed 32-bit range. Map it to BigInteger instead.

The regression test persists a 2043-era timestamp and verifies the value round-trips, while also asserting the SQLAlchemy column type.

Validation:

  • python -m pytest -q
  • python -m mypy fastapi_users_db_sqlalchemy/
  • python -m ruff format --check .
  • MySQL dialect compilation confirms BIGINT

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.

OAuthAccount.expires_at should be BigInteger

2 participants