Skip to main content
deleted 30 characters in body; edited tags
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

error in text:

Uncaught Error: Use of private key authentication in the browser is 
insecure. Consider using OAuth, instead.
at Object.ee.data.authenticateViaPrivateKey (bundle.js:18136)
at Object.2../privatekey.json (bundle.js:23980)
at o (bundle.js:1)
at r (bundle.js:1)
at bundle.js:1

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error" Thanks for any help in advance.

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

error in text:

Uncaught Error: Use of private key authentication in the browser is 
insecure. Consider using OAuth, instead.
at Object.ee.data.authenticateViaPrivateKey (bundle.js:18136)
at Object.2../privatekey.json (bundle.js:23980)
at o (bundle.js:1)
at r (bundle.js:1)
at bundle.js:1

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error" Thanks for any help in advance.

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

error in text:

Uncaught Error: Use of private key authentication in the browser is 
insecure. Consider using OAuth, instead.
at Object.ee.data.authenticateViaPrivateKey (bundle.js:18136)
at Object.2../privatekey.json (bundle.js:23980)
at o (bundle.js:1)
at r (bundle.js:1)
at bundle.js:1

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error".

added 330 characters in body
Source Link

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

error in text:

Uncaught Error: Use of private key authentication in the browser is 
insecure. Consider using OAuth, instead.
at Object.ee.data.authenticateViaPrivateKey (bundle.js:18136)
at Object.2../privatekey.json (bundle.js:23980)
at o (bundle.js:1)
at r (bundle.js:1)
at bundle.js:1

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error" Thanks for any help in advance.

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error" Thanks for any help in advance.

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

error in text:

Uncaught Error: Use of private key authentication in the browser is 
insecure. Consider using OAuth, instead.
at Object.ee.data.authenticateViaPrivateKey (bundle.js:18136)
at Object.2../privatekey.json (bundle.js:23980)
at o (bundle.js:1)
at r (bundle.js:1)
at bundle.js:1

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error" Thanks for any help in advance.

Source Link

Google Earth Engine ee.data.authenticateViaPrivateKey in Node.js not working

I'm using visual studio code to develop a web application that monitors air quality using google earth engine. The issue I'm having is that the authentication is not working. I already tried the instructions in the google earth engine NPM installation guide but that doesn't work either.

here my code:

var ee = require('@google/earthengine');
var privateKey = require('./privatekey.json');
var client_email = "email"
ee.data.authenticateViaPrivateKey(
{client_email, privateKey},
() => console.log('Authentication succeeded'),
error => console.error('Authentication failed:')

)

I know the issue is not the value of the client_email variable. I just changed it here just in case. The error shows error displayed

I don't know if this is relevant information but I'm also using Browserify so that my main.js script would work since it previously displayed a "require not defined error" Thanks for any help in advance.