fastapi-users-db-sqlalchemy icon indicating copy to clipboard operation
fastapi-users-db-sqlalchemy copied to clipboard

FastAPI Users - Database adapter for SQLAlchemy + encode/databases

Results 10 fastapi-users-db-sqlalchemy issues
Sort by recently updated
recently updated
newest added

This PR implements support for SQLAlchemy synchronous `Session`, alongside existing support for `AsyncSession`. Based on @frankie567's answer in this discussion on "Synchronous SQLAlchemy?": https://github.com/fastapi-users/fastapi-users/discussions/1144#discussioncomment-4653607 * Copied `SQLAlchemyUserDatabase` --> `SQLAlchemySynchronousUserDatabase` and...

## Describe the bug An index is created on the `email` field: https://github.com/fastapi-users/fastapi-users-db-sqlalchemy/blob/main/fastapi_users_db_sqlalchemy/__init__.py#L61 but the index can't be used by the `get_by_email()` method because the filtering uses a function on...

bug

let’s not hardcode OAuthAccount type and use the protocol instead.

## Describe the bug Currently the code hacks the handling of `User` attributes with a condition on `TYPE_CHECKING`. This hack should no longer exist because mypy now handles sqlalchemy field...

bug

Happens only when using Postgresql, with Sqlite there are no problems. Problem exists probably also in other implementations (e.g. sqlmodel)

Hi @frankie567 πŸ‘‹πŸ» I've been playing with fastapi-users and I have to remove unique constaint on email col due to soft deletes. Hence, I added my own email col however...

This pull request increases the maximum length of the access_token and refresh_token fields in the SQLAlchemy OAuth account model from 1024 to 4096 characters. OAuth2 providers using long JWT tokens...

## Describe the bug When using OAuth2 providers such as Authentik with RS256-signed access tokens, the access_token (and sometimes refresh_token) exceeds 1024 characters. This results in a StringDataRightTruncation error in...

bug

When using OAuth2 providers such as Authentik with RS256-signed access tokens, the access_token (and sometimes refresh_token) exceeds 1024 characters. This results in a StringDataRightTruncation error in PostgreSQL: ```bash psycopg.errors.StringDataRightTruncation: value...

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...