fix: remove granted_at from login token

pull/20496/head
GareArc 12 months ago
parent 39ef0f9aca
commit fd815d390d
No known key found for this signature in database

@ -150,6 +150,8 @@ def exchange_token_for_existing_web_user(app_code: str, enterprise_user_decoded:
"app_code": site.code, "app_code": site.code,
"user_id": user_id, "user_id": user_id,
"end_user_id": end_user.id, "end_user_id": end_user.id,
"auth_type": auth_type,
"granted_at": int(datetime.now(UTC).timestamp()),
"token_source": "webapp", "token_source": "webapp",
"exp": exp, "exp": exp,
} }

@ -1,6 +1,5 @@
import random import random
from datetime import UTC, datetime, timedelta from datetime import UTC, datetime, timedelta
from time import time
from typing import Any, Optional, cast from typing import Any, Optional, cast
from configs import dify_config from configs import dify_config
@ -110,7 +109,6 @@ class WebAppAuthService:
"session_id": account.email, "session_id": account.email,
"token_source": "webapp_login_token", "token_source": "webapp_login_token",
"auth_type": "internal", "auth_type": "internal",
"granted_at": int(time()),
"exp": exp, "exp": exp,
} }

Loading…
Cancel
Save