mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
add auth and redis endpoints
This commit is contained in:
@@ -38,7 +38,7 @@ async def create_access_token(user: User, request: Request):
|
||||
_payload = {
|
||||
"email": user.email,
|
||||
"expiry": time.time() + global_settings.jwt_expire,
|
||||
"platform": request.headers.get("User-Agent")
|
||||
"platform": request.headers.get("User-Agent"),
|
||||
}
|
||||
_token = jwt.encode(_payload, str(user.password), algorithm=global_settings.jwt_algorithm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user