I am using Firebase authentication for one of my applications and want to implement signInWithRedirect
(instead of signInWithPopup
). I am following the documentation provided here
and want to host the files locally (option 4).
Based on the instructions, I am supposed to download the files using the following instructions:
mkdir signin_helpers/ && cd signin_helpers
wget https://<project>.firebaseapp.com/__/auth/handler
wget https://<project>.firebaseapp.com/__/auth/handler.js
wget https://<project>.firebaseapp.com/__/auth/experiments.js
wget https://<project>.firebaseapp.com/__/auth/iframe
wget https://<project>.firebaseapp.com/__/auth/iframe.js
wget https://<project>.firebaseapp.com/__/firebase/init.json
While all other files (like auth/handler
etc.) are getting downloaded successfully, I am not able to download firebase/init.json
file. I am always getting a 404 error back on this particular file.
How can I download this particular file? Or is there an issue with the instructions provided? Any help regarding this will be highly appreciated.
You can create the __/firebase/init.json file yourself. You should be fine with it just containing the following:
{
"apiKey": "AIz...",
"authDomain": "your.authdomain.com"
}
Where apiKey is the public Firebase API key, and authDomain is the authentication domain (presumably the one you're using to self-host the auth flow).