Is there a way to disable JS Object functions on a page with out actually being on that page?
I recently added a new function in my app that checks for user auth on page load to make sure the Appsmith internal user's token is not expired.
Here is the new function within my 'Monitor' page.
checkAuth: () => {
validateSSOToken.run()
.then(() => {Api.run()} )
.catch(() => {
storeValue('idToken', undefined)
navigateTo('Sign In')
})
}
The issue is that my 'validateSSOToken' API's bearer token is incorrect so it ALWAYS returns a 401. Therefore, the function always hits the catch statement and redirects me to the 'Sign In' page immediately. So, even when i'm in the edit mode of Appsmith the 'Monitor' page is inaccessible. I can't do anything in the page. I don't have any previous copies of the app and i'm not version controlling on Git.
Please help!