Spaces:
Sleeping
Sleeping
QDB Setup commited on
Commit ·
2ec983f
1
Parent(s): 0b708c5
Show which auth secret is missing to help diagnose
Browse files- app/core/auth.py +16 -2
app/core/auth.py
CHANGED
|
@@ -61,9 +61,23 @@ def _login_screen(require_admin: bool) -> None:
|
|
| 61 |
st.markdown("ادخل بحساب Microsoft الخاص بالشركة فقط.")
|
| 62 |
|
| 63 |
if not _config_ok():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
st.error(
|
| 65 |
-
"⚠️ إعدادات Microsoft auth ناقصة. "
|
| 66 |
-
"اتأكد إن
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
)
|
| 68 |
st.stop()
|
| 69 |
|
|
|
|
| 61 |
st.markdown("ادخل بحساب Microsoft الخاص بالشركة فقط.")
|
| 62 |
|
| 63 |
if not _config_ok():
|
| 64 |
+
missing = []
|
| 65 |
+
if not settings.ms_tenant_id:
|
| 66 |
+
missing.append("MS_TENANT_ID")
|
| 67 |
+
if not settings.ms_client_id:
|
| 68 |
+
missing.append("MS_CLIENT_ID")
|
| 69 |
+
if not settings.ms_client_secret:
|
| 70 |
+
missing.append("MS_CLIENT_SECRET")
|
| 71 |
st.error(
|
| 72 |
+
f"⚠️ إعدادات Microsoft auth ناقصة. الـ secrets الناقصة: **{', '.join(missing)}**. "
|
| 73 |
+
"اتأكد إنها موجودة في HF Space → Settings → Variables and secrets."
|
| 74 |
+
)
|
| 75 |
+
st.caption(
|
| 76 |
+
f"Debug: tenant={'set' if settings.ms_tenant_id else 'MISSING'} "
|
| 77 |
+
f"client={'set' if settings.ms_client_id else 'MISSING'} "
|
| 78 |
+
f"secret={'set' if settings.ms_client_secret else 'MISSING'} "
|
| 79 |
+
f"redirect={settings.ms_redirect_uri or 'MISSING'} "
|
| 80 |
+
f"domain={settings.allowed_email_domain or 'MISSING'}"
|
| 81 |
)
|
| 82 |
st.stop()
|
| 83 |
|