Skip to content

Firebase auth adater requires an credential #5

@apoleo88

Description

@apoleo88

Hi!

After an endless search of the generic error Uncaught internal server error.

I found out that the real error was: Firebase auth adater requires an credential. It is triggered in util.js and it isn't properly caught by index.js.

Because somehow it wasn't able to find the credential when passed in ParseServer({..}) and neither when inserted in the .env file or initiated with export.

ParseServer({..}) example:

"auth" : {
     "firebase" : {
         "module" : "parse-server-firebase-auth-adapter",
         "databaseURL" : "https://MY.firebaseio.com",
         "credential" : "./serviceAccountKey.json",
     }
},

To fix the error I had to install dotenv and add require('dotenv').config() to my app.js to make it reads the environment variables.

I wonder if you know why originally it didn't read the credential?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions