I’m deploying Laravel 11 project which use Firebase. But whenever I try to use anything related to Firebase (Authentication, Realtime Database), I always get this error:
error picture
Anything else on the web is running, only the parts use Firebase features return that error (login, register). I put these in .env
file but it seems to not added to Heroku:
FIREBASE_PROJECT=testing
FIREBASE_CREDENTIALS=credentials.json
FIREBASE_DATABASE_URL=the_actual_url
Testing on localhost works perfectly with php artisan serve
. I put the credentials.json in the root folder like this /project/credentials.json
. I don’t know if is it a Heroku problem since everything else seems to be okay on localhost. Any suggestions would be appreciated.