Problem: - MSAL was throwing runtime errors when Azure credentials were incomplete - Script error in browser due to invalid MSAL configuration - PublicClientApplication constructor failing with empty/undefined values Solution: - Added tenant ID validation in addition to client ID check - Wrapped MSAL initialization in try-catch to handle configuration errors gracefully - Log warning instead of crashing when MSAL cannot be initialized - Allow application to continue with simple login when Azure is not configured Changes: - Check both REACT_APP_AZURE_CLIENT_ID and REACT_APP_AZURE_TENANT_ID - Use try-catch when creating PublicClientApplication instance - Set msalInstance to null on initialization failure - Console warning for debugging when Azure AD is not properly configured This prevents runtime errors and allows the application to work in test mode without requiring valid Azure AD configuration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .env.example | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||