Skip to content

Instantly share code, notes, and snippets.

@sadeghianme
Created February 16, 2020 10:46
Show Gist options
  • Save sadeghianme/0b1a498345847bc9b3f67241e0ee9dc3 to your computer and use it in GitHub Desktop.
Save sadeghianme/0b1a498345847bc9b3f67241e0ee9dc3 to your computer and use it in GitHub Desktop.
SailsJs v1.2.3 use FirebaseWaterline Adapter
I installed the blow link for using firebase in sails js but got this error: npm install sails-firebase --save
in datastores.js:
module.exports.datastores = {
default: {
adapter: 'sails-mongo',
url: 'mongodb://localhost:27017/dashboard-auth'
},
firebase: {
adapter: 'sails-firebase',
credential: {
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"client_email": "sample@gmail.com",
"client_id": "sample@gmail.com",
// "client_x509_cert_url": "<YOUR CLIENT X509 CERTIFICATE>",
"private_key": "MY API KEY",
"private_key_id": "MY API KEY",
"project_id": "myApp",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"type": "service_account",
},
databaseURL: "https://myApp.firebaseapp.com",
}
};
Error: -----------------------------------------
The adapter used by the firebase datastore is not compatible with the current version of Sails/Waterline.
The adapter should expose a valid adapterApiVersion.
If you're using Sails ≥1.0, try: npm install sails-firebase@latest --save
after that i used "npm install sails-firebase@latest --save" but not work :( is there any npm package or any method for using firebase?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment