You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to restart my Fridge project after a couple of weeks of inactivity to do some modifications.
The Agent code started failing with the error message:
I logged the access_token, and it was indeed expired. From my reading of getStoredCredentials() and getOAuthToken(...) the oAuth details are persisted as a Squirrel table. This seems problematic, as the access_token expires and needs to be updated using a refresh token periodically.
I initially tried adding a server.save({}); immediately after the server.error on line 204. However, that didn't restart to OAuth process to get a valid access_token.
Seems I also needed to browse to the Agent URL to complete the OAuth steps again.
Failing using the refresh_token, is there a way to clear out the existing expired OAuth details and indicate that the agent URL needs to be browsed to?
The text was updated successfully, but these errors were encountered:
What I found is that refresh token has never been used in the library/examples. So I added update of access token into the smart refrig example. I haven't fully tested it yet, but you should get the idea.
I tried to restart my Fridge project after a couple of weeks of inactivity to do some modifications.
The Agent code started failing with the error message:
I logged the access_token, and it was indeed expired. From my reading of
getStoredCredentials()
andgetOAuthToken(...)
the oAuth details are persisted as a Squirrel table. This seems problematic, as the access_token expires and needs to be updated using a refresh token periodically.I initially tried adding a
server.save({});
immediately after theserver.error
on line 204. However, that didn't restart to OAuth process to get a valid access_token.Seems I also needed to browse to the Agent URL to complete the OAuth steps again.
Failing using the refresh_token, is there a way to clear out the existing expired OAuth details and indicate that the agent URL needs to be browsed to?
The text was updated successfully, but these errors were encountered: