From 98c100e9024fe9e4a1e05eab997b9dff64c7dc99 Mon Sep 17 00:00:00 2001 From: jbyrne Date: Thu, 28 Mar 2024 10:51:43 -0700 Subject: [PATCH] issue/hitide-ui-45: testing hitide profile download history --- src/hitideConfig.js | 3 ++- src/jpl/utils/LoginApi.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hitideConfig.js b/src/hitideConfig.js index 43686899..baca144b 100644 --- a/src/hitideConfig.js +++ b/src/hitideConfig.js @@ -1,4 +1,5 @@ -var hitideProfileOrigin = "https://hitide.profile.podaac.uat.earthdatacloud.nasa.gov/hitide/api"; +// var hitideProfileOrigin = "https://hitide.profile.podaac.sit.earthdatacloud.nasa.gov/hitide/api"; +var hitideProfileOrigin = "http://localhost:8080/hitide/api"; window.hitideConfig = { paletteService: "https://hitide.podaac.earthdatacloud.nasa.gov/palettes", diff --git a/src/jpl/utils/LoginApi.js b/src/jpl/utils/LoginApi.js index 7c383358..4f3293ce 100644 --- a/src/jpl/utils/LoginApi.js +++ b/src/jpl/utils/LoginApi.js @@ -29,6 +29,7 @@ define([ } function initialLoginCheck(){ + console.log('initial login check') topic.publish(MyDataEvent.prototype.LOGIN_STATUS_CHANGE, appUser); var state = extractParamFromUrl("state"); @@ -42,7 +43,9 @@ define([ var code = extractParamFromUrl("code"); if(code){ removeQueryFromUrl(); + console.log('auth code: ', code) loginWithAuthCode(code, urlWithoutQueryOrFragment(), function(user){ + console.log(user) if(user.error){ /* Handle Error (just log it for now) */ console.log("LoginApi.initialLoginCheck() loginWithAuthCode() error: " + user.error); @@ -112,6 +115,7 @@ define([ throw Error("LoginApi.safeLogin() called while already logged in"); } getSessionUser(function(user){ + console.log("USER: ",user) if(user.error){ /* handle error (for now just log error) */ console.log("LoginApi.safeLogin() getSessionUser() error: " + user.error); @@ -189,6 +193,7 @@ define([ } function getSessionUser(callback){ + console.log("USER: ",callback) var xhr = new XMLHttpRequest(); xhr.open("GET", getUserUrl); xhr.responseType = "json";