igorbenav / FastAPI-boilerplate

An extendable async API using FastAPI, Pydantic V2, SQLAlchemy 2.0, PostgreSQL and Redis.
MIT License
589 stars 69 forks source link

Fixes default expire time in creating access token #143

Closed KennethTV closed 3 months ago

KennethTV commented 3 months ago

Fixes the default expire timedelta used in the function to create an access token.

The default timedelta in create_access_token is updated from '15' to the config setting of ACCESS_TOKEN_EXPIRE_MINUTES.

This matches the behavior of the create_refresh_token function right below it, which uses the config setting of REFRESH_TOKEN_EXPIRE_DAYS for its default expire timedelta. (ACCESS_TOKEN_EXPIRE_MINUTES was also already imported into the file for this likely purpose while not being used.)

igorbenav commented 3 months ago

Nice catch!