- Project ID: scamguard-c3e04
- Project Number: 621907828918
- API Key: [redacted — store in AWS Secrets Manager or environment variable]
Authentication → Sign-in method → Phone → Enable
Authentication → Phone providers → Add test phone numbers
Exemple:
Phone: +14388313122
Code: 123456 (or any 6-digit code)
Option A - Local Development (.env):
export FIREBASE_API_KEY="<your-firebase-api-key>"
export FIREBASE_PROJECT_ID="scamguard-c3e04"Option B - AWS Lambda Environment (CDK):
new lambda.Function(this, 'SMSOTPHandler', {
handler: 'index.request_otp',
environment: {
FIREBASE_API_KEY: '<your-firebase-api-key>',
FIREBASE_PROJECT_ID: 'scamguard-c3e04',
}
});Local:
# Mock server (no SMS sent, logged to console)
node mock-server.js
# Phone: +14388313122
# Code will be logged: "OTP for +14388313122: 123456"Production avec Firebase:
# Phone number must be added to Firebase test list
# SMS arrives in 2-5 seconds
curl -X POST https://your-api/api/v1/auth/request-sms-otp \
-H "Content-Type: application/json" \
-d '{"phone":"+14388313122"}'- ✅ Credentials configurés dans ScamGuard
- 🟡 Aller à Firebase Console → activer Phone Auth
- 🟡 Ajouter numéros de test
- 🟡 Déployer backend avec les variables d'environnement
- ✅ Frontend local teste avec mock-server.js
- Phone Auth Docs: https://firebase.google.com/docs/auth/web/phone-auth
- SMS Troubleshooting: https://firebase.google.com/docs/auth/phone-questions