modcomms/frontend
michael 321a9ca820 Implement Microsoft MSAL SSO with PKCE flow
Frontend:
- Add @azure/msal-browser and @azure/msal-react packages
- Create authConfig.ts with MSAL configuration for PKCE flow
- Create authService.ts for token acquisition and user info
- Wrap App with MsalProvider in index.tsx
- Replace dummy login with real MSAL loginPopup() in Login.tsx
- Update App.tsx to use useIsAuthenticated/useMsal hooks
- Update Profile.tsx to display real user data from claims
- Update geminiService.ts to include access_token in WebSocket messages
- Update WIPReviewer.tsx to pass msalInstance for auth

Backend:
- Add python-jose and httpx dependencies for JWT verification
- Create auth_service.py with Azure AD JWKS fetching and token verification
- Create auth.py FastAPI dependency for protected REST endpoints
- Update main.py to verify tokens on WebSocket and protect /info endpoint
- Add AZURE_TENANT_ID, AZURE_CLIENT_ID, DISABLE_AUTH to config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 08:43:30 -06:00
..
components Implement Microsoft MSAL SSO with PKCE flow 2025-12-16 08:43:30 -06:00
services Implement Microsoft MSAL SSO with PKCE flow 2025-12-16 08:43:30 -06:00
App.tsx Implement Microsoft MSAL SSO with PKCE flow 2025-12-16 08:43:30 -06:00
constants.ts initial commit 2025-12-12 09:03:17 -06:00
index.html initial commit 2025-12-12 09:03:17 -06:00
index.tsx Implement Microsoft MSAL SSO with PKCE flow 2025-12-16 08:43:30 -06:00
metadata.json initial commit 2025-12-12 09:03:17 -06:00
package-lock.json Implement Microsoft MSAL SSO with PKCE flow 2025-12-16 08:43:30 -06:00
package.json Implement Microsoft MSAL SSO with PKCE flow 2025-12-16 08:43:30 -06:00
README.md initial commit 2025-12-12 09:03:17 -06:00
tsconfig.json initial commit 2025-12-12 09:03:17 -06:00
types.ts initial commit 2025-12-12 09:03:17 -06:00
vite.config.ts initial commit 2025-12-12 09:03:17 -06:00

GHBanner

Run and deploy your AI Studio app

This contains everything you need to run your app locally.

View your app in AI Studio: https://ai.studio/apps/drive/1vH-R-vj0Xkk_g2ZFdHtLxNc12sFTOl2L

Run Locally

Prerequisites: Node.js

  1. Install dependencies: npm install
  2. Set the GEMINI_API_KEY in .env.local to your Gemini API key
  3. Run the app: npm run dev