Last active
March 25, 2025 13:39
-
-
Save gasaichandesu/952aaa7bc6c47ee925790bbd92a02ee5 to your computer and use it in GitHub Desktop.
For anyone facing an `internal-error` using Firebase Auth trying to send an email with actionCodeSettings on iOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const admin = require('firebase-admin'); | |
admin.initializeApp({ | |
// See https://firebase.google.com/docs/admin/setup/#initialize_the_sdk_in_non-google_environments on | |
// how to acquire credentials for your Firebase project | |
credential: admin.credential.cert(require("./credentials.json")) | |
}); | |
const updateRequest = { | |
mobileLinksConfig: { | |
domain: 'HOSTING_DOMAIN' | |
} | |
} | |
/** | |
This is a simple trick to force your Firebase project use Firebase Hosting instead of Firebase Dynamic | |
Links. For some reason since Google already started deprecating FDL if your project is not using it you | |
will receive internal-error when trying to send Email using `sendPasswordResetEmail` or similar functions. | |
After you have executed this script, issue will be resolved | |
The funniest shit is that Firebase Console does not have it in UI yet and I spent 3 hours trying to | |
find a workaround :):):) | |
*/ | |
admin.auth().projectConfigManager().updateProjectConfig(updateRequest); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment