igorbenav / FastAPI-boilerplate

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

Fixes default expire time in creating access token #143

Closed KennethTV closed 5 months ago

KennethTV commented 5 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 5 months ago

Nice catch!