fix: handle empty token in wraps

This commit is contained in:
GareArc 2025-06-05 18:36:22 +09:00
parent 6c133dc45c
commit 3c3261b42e
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ def decode_jwt_token():
return app_model, end_user
except Unauthorized as e:
if system_features.webapp_auth.enabled:
if not app_code:
raise Unauthorized("Please re-login to access the web app.")
app_web_auth_enabled = (
EnterpriseService.WebAppAuth.get_app_access_mode_by_code(app_code=str(app_code)).access_mode != "public"
)