From 8941213c8d94f3ad84e07e467e78105dc7fed734 Mon Sep 17 00:00:00 2001 From: Parker Date: Fri, 8 Nov 2024 23:07:20 -0600 Subject: Mainly auth re-thinking - just in thought --- app/routes/auth_routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/routes/auth_routes.py') diff --git a/app/routes/auth_routes.py b/app/routes/auth_routes.py index 3054e22..ceb68b1 100644 --- a/app/routes/auth_routes.py +++ b/app/routes/auth_routes.py @@ -33,7 +33,7 @@ async def login_for_access_token( detail="Incorrect username or password", headers={"WWW-Authenticate": "Bearer"}, ) - access_token_expires = timedelta(minutes=15) + access_token_expires = timedelta(minutes=1) access_token = create_access_token( data={"sub": user.id, "username": user.username, "refresh": False}, expires_delta=access_token_expires, @@ -63,7 +63,7 @@ async def refresh_access_token( """ Return a new access token if the refresh token is valid """ - access_token_expires = timedelta(minutes=30) + access_token_expires = timedelta(minutes=1) access_token = create_access_token( data={"sub": current_user.id, "refresh": False}, expires_delta=access_token_expires, -- cgit v1.2.3-70-g09d2