diff options
Diffstat (limited to 'gn_auth/auth')
-rw-r--r-- | gn_auth/auth/authorisation/users/admin/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gn_auth/auth/authorisation/users/admin/views.py b/gn_auth/auth/authorisation/users/admin/views.py index f343da1..a4c4033 100644 --- a/gn_auth/auth/authorisation/users/admin/views.py +++ b/gn_auth/auth/authorisation/users/admin/views.py @@ -5,6 +5,7 @@ import random import string from typing import Optional from functools import partial +from dataclasses import asdict from urllib.parse import urlparse from datetime import datetime, timezone, timedelta @@ -80,7 +81,7 @@ def login(): user = user_by_email(conn, email["email"]) if valid_login(conn, user, password): session.update_session_info( - user=user._asdict(), + user=asdict(user), expires=( datetime.now(tz=timezone.utc) + timedelta(minutes=10))) return redirect(url_for(next_uri)) |