diff --git a/README.md b/README.md index 9e19004..4f2bb25 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,19 @@ docker compose restart worker docker compose down ``` +#### Test User Credentials (Local Development Only) + +For testing different user roles locally: + +``` +Admin: admin@example.com / admin +Production: production@example.com / production +Reviewer: reviewer@example.com / reviewer +Client: client@example.com / client123 +``` + +**Note**: These test users are only for local development. Production uses Microsoft authentication. + ### Alternative: Native Development (Without Docker) For development without Docker, you'll need to run each service manually: diff --git a/frontend/src/routes/Login.tsx b/frontend/src/routes/Login.tsx index 86dbfac..e668b4d 100644 --- a/frontend/src/routes/Login.tsx +++ b/frontend/src/routes/Login.tsx @@ -10,6 +10,7 @@ export function Login() { const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [microsoftLoading, setMicrosoftLoading] = useState(false); + const [showLocalLogin, setShowLocalLogin] = useState(false); const navigate = useNavigate(); const { login, isLoading, setUser } = useAuthStore(); const { instance } = useMsal(); @@ -144,75 +145,81 @@ export function Login() {

Sign in to your account to continue

-
- {error && ( -
- - {error} + {/* Error Display */} + {error && ( +
+ + {error} +
+ )} + + {/* Local Login Form (Conditionally Shown) */} + {showLocalLogin && ( + +
+ + setEmail(e.target.value)} + className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200" + placeholder="Enter your email" + />
- )} -
- - setEmail(e.target.value)} - className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200" - placeholder="Enter your email" - /> +
+ + setPassword(e.target.value)} + className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200" + placeholder="Enter your password" + /> +
+ + + + )} + + {/* Divider (Only when local form is visible) */} + {showLocalLogin && ( +
+
+
+
+
+ Or continue with +
+ )} -
- - setPassword(e.target.value)} - className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200" - placeholder="Enter your password" - /> -
- - - - - {/* Divider */} -
-
-
-
-
- Or continue with -
-
- - {/* Microsoft Sign In Button */} + {/* Microsoft Sign In Button (Always Visible) */}
+ )} + + {/* Support Contact */} +
+

+ Need help? Contact{' '} + + support@videoaccess.com + +