firebase / firebase/firebase-js-sdk
`verifyPhoneNumber` errors with `auth/invalid-app-credential` only on localhost
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### Operating System
macOS Sonoma 14.2.1
### Browser Version
Chrome 126.0.6478.183
### Firebase SDK Version
10.12.4
### Firebase SDK Product:
AppCheck, Auth
### Describe your project's tooling
Next.js using firebase app check with reCAPTCHA Enterprise with configured debug app check token
### Describe the problem
On localhost `verifyPhoneNumber` calls following endpoint
`https://identitytoolkit.googleapis.com/v2/accounts/mfaSignIn:start?key=`
which returns
```
{
"error": {
"code": 400,
"message": "INVALID_APP_CREDENTIAL",
"status": "INVALID_ARGUMENT"
}
}
```
### Steps and code to reproduce issue
1. Call `verifyPhoneNumber` in multifactor authentication flow on localhost
### Important facts
- Interestingly,`verifyPhoneNumber` work perfectly fine, but stopped working couple of days ago only when developing locally on localhost
- The deployed (hosted on Vercel) even after redeployment continue to work just fine
- Similar issue reported here https://www.reddit.com/r/Firebase/comments/1e8pdcf/firebase_error_authinvalidappcredentials_in/
Contributor guide
Assessment
This issue has not been assessed yet.