aboutsummaryrefslogtreecommitdiff
path: root/app/routes/auth_routes.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-11-08 23:07:20 -0600
committerParker <contact@pkrm.dev>2024-11-08 23:07:20 -0600
commit8941213c8d94f3ad84e07e467e78105dc7fed734 (patch)
tree0ae32555276432b4ddb04a7548ffe2e40904f897 /app/routes/auth_routes.py
parent3cde652d52985365d1daf370065753f54e765f9d (diff)
Mainly auth re-thinking - just in thought
Diffstat (limited to 'app/routes/auth_routes.py')
-rw-r--r--app/routes/auth_routes.py4
1 files changed, 2 insertions, 2 deletions
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,