fix(auth): restrict seeded credentials exclusively to super admin and demo student in backend and api documentation

This commit is contained in:
2026-09-04 12:01:02 +05:30
parent 3ad281aae6
commit 5951ab5b3f
3 changed files with 48 additions and 84 deletions

View File

@@ -169,7 +169,7 @@ FastAPI dependency `require_tier(allowed_tiers: List[models.TierEnum])` inspects
- **Request Headers:**
- `Accept: application/json`
- **Request Query Parameters:**
- `phone_or_email` (string, required): e.g. `9876543210` or `student@pragativeer.com`
- `phone_or_email` (string, required): e.g. `9876543210` or `demo@pragativeer.com`
- **Response Headers:**
- `Content-Type: application/json`
- **Status Codes & Response Payloads:**
@@ -233,7 +233,7 @@ PragatiVeer v2 enforces a strict single-device login policy:
{
"id": "b0e17378-864d-439e-8806-708dc48a891b",
"phone": "9999999999",
"email": "student@pragativeer.com",
"email": "demo@pragativeer.com",
"name": "Rahul Sharma",
"student_class": "12",
"medium": "English",
@@ -1156,7 +1156,7 @@ All Admin endpoints require superadmin access:
- **Request Body Schema:**
```json
{
"email": "student@pragativeer.com"
"email": "demo@pragativeer.com"
}
```
- **Response Headers:**
@@ -1205,15 +1205,12 @@ The following endpoints are specified in [PRD.md](file:///c:/Users/naman/OneDriv
| **Study Materials Library** | `GET /api/materials` | [materials/page.tsx](file:///c:/Users/naman/OneDrive/Desktop/pragativeer-v2/src/app/dashboard/materials/page.tsx) | MinIO PDF formula sheet catalog and access controls |
| **Voice AI & Live Battle** | `/ws/battles`, `/api/ai-coach/voice` | Future Scope | WebSockets for multiplayer CBT battles & Whisper voice |
---
## 5. Seeded Credentials Reference
The platform provides two pre-configured accounts for administration and end-to-end evaluation:
| Role | Email | Password | Tier / Features |
| :--- | :--- | :--- | :--- |
| **AI Coach Student** | `demo@pragativeer.com` | `Pv9#kL2$mQ8!vX4@` | AI Coach (AI Tutor, College Predictor, Spaced Repetition) |
| **AI Coach Student** | `student@pragativeer.com` | `Password123!` | Rahul Sharma (Default AI Coach Profile) |
| **AI Coach Student** | `neha@pragativeer.com` | `Password123!` | Neha Verma (62-Day Streak presentation account) |
| **Pro Tier Student** | `pro@pragativeer.com` | `Password123!` | Priya Singh (Pro Tier, Full CBT engine access) |
| **Free Tier Student** | `free@pragativeer.com` | `Password123!` | Amit Kumar (Free Tier, baseline practice) |
| **Super Admin** | `admin@pragativeer.com` | `admin123` | Full access to `/admin` management console |
| **Super Admin** | `admin@pragativeer.com` | `admin123` | Full access to `/admin` management console & question bank |
| **AI Coach Student** | `demo@pragativeer.com` | `Pv9#kL2$mQ8!vX4@` | Full AI Coach access (AI Tutor SSE stream, College Predictor, CBT Mock Engine, Spaced Repetition) |