Commit graph

1 commit

Author SHA1 Message Date
Vadym Samoilenko
523be058aa Add Azure AD / MSAL SSO authentication
- config.php: Azure tenant/client constants, SSO_ENABLED = true
- auth.php: requireAuth() middleware, getSafeUser(), getUserDataFile()
- auth_gate.php: MSAL.js PKCE login flow, stores return URL in sessionStorage
- logout.php: destroys PHP session + calls msalInstance.logoutRedirect()
- api.php: public create_session endpoint (JWT validation), 401 guard on all other actions, per-user data files (data_{safeUser}.json)
- sheet_helpers.php: fix dot sanitisation '_' → '_dot_' to match getSafeUser()
- index/builder/help.php: requireAuth() at top, user email + Sign Out in header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 21:43:32 +00:00