# סיכום סשן — 0004
תאריך: 2026-05-10
אפליקציה: VitPMIS
נושא: Google Sign-In Fix

---

## מה נבנה/הושלם

### Google Sign-In — תיקון מלא
- `vitruviusecosystem@gmail.com` הוסף כ-Owner לפרויקט Firebase `vitpmis` (דרך Google Cloud IAM Console)
- Google Sign-In provider הופעל ב-Firebase Authentication Console
  - Support email: `vitruviusecosystem@gmail.com`
  - Project public name: VitPMIS
- `google-services.json` הורד מחדש מ-Firebase Console והוחלף בפרויקט
  - נתיב: `D:\Vitruvius Ecosystem\VitPMIS\android\app\google-services.json`
  - כעת מכיל: `oauth_client: [{client_type:1}, {client_type:3}]`
- אפליקציה נבנתה מחדש ועלתה על Pixel 6 API 34 ✓
- Google Sign-In מגיע ל-OAuth consent screen (לא עוד `ApiException: 10`)

### OAuth Consent Screen
- נוסף test user דרך Google Cloud Console (`console.cloud.google.com/apis/credentials/consent?project=vitpmis`)
- ה-consent screen מציג: Gmail, Contacts, Drive, Calendar, Tasks — scopes מה-CalendarService
- המשתמש שאל על Google Maps, Gemini, Claude, GPT — נדחה ל-Sprint 3+

---

## החלטות שהתקבלו

1. **vitruviusecosystem@gmail.com כ-Owner** — כל הניהול של Firebase יהיה מחשבון האקוסיסטם, לא מהחשבון האישי
2. **Support email = vitruviusecosystem@gmail.com** — כתובת תמיכה לאפליקציה
3. **OAuth Scopes — לצמצם בהמשך** — כרגע יש Gmail/Contacts/Drive שלא בשימוש, יש לנקות ב-Sprint 3

---

## בעיות שנפתרו

| בעיה | פתרון |
|------|--------|
| `ApiException: 10` (DEVELOPER_ERROR) | `google-services.json` היה עם `oauth_client: []` — הפעלת Google Sign-In provider ב-Firebase יצרה את ה-OAuth clients, הורדנו `google-services.json` חדש |
| Support email לא בדרופדאון | `vitruviusecosystem@gmail.com` לא היה Owner — הוספנו אותו כ-Owner דרך Google Cloud IAM Console |
| "Google hasn't verified this app" — אין "Go to unsafe" | קורה עם sensitive scopes — פתרון: הוסף test user ב-OAuth consent screen |

---

## מה לא עבד / צריך להיזהר

- **gcloud CLI לא מותקן** — לניהול IAM בפעם הבאה: Google Cloud Console ב-browser
- **OAuth Scopes רחבים מדי** — GoogleSignIn מבקש Gmail/Contacts/Drive מיותרים — לצמצם
- **Claude ו-GPT אינם שירותי Google** — Anthropic ו-OpenAI, APIs נפרדים לחלוטין

---

## קבצים שנוצרו/שונו

| קובץ | שינוי |
|------|--------|
| `android/app/google-services.json` | **הוחלף** — גרסה חדשה עם oauth_client (client_type 1+3) |

---

## הצעד הבא (Sprint 3)

1. **וידוא כניסה** — לאשר OAuth consent ולוודא שהמשתמש נכנס עד ל-AppShell
2. **Calendar Button** — ב-`project_detail_screen.dart`: כפתור "הוסף ללוח שנה" → `CalendarService.instance.upsertProjectEvent(project)`
3. **Voice → Project Picker** — `showDialog` לאחר זיהוי קולי
4. **OAuth Scopes — צמצום** — הסרת Gmail/Contacts/Drive אם לא נדרשים ב-`auth_service.dart`
5. **Google Maps** — אינטגרציה נפרדת (API key + `google_maps_flutter` package)
6. **Gemini / Claude / GPT** — אינטגרציות AI — Sprint 4+
