@knowlearning/agents 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/generic.js +3 -0
- package/package.json +1 -1
package/agents/generic.js
CHANGED
|
@@ -126,6 +126,9 @@ export default function Agent({ host, token, WebSocket, protocol='ws', uuid, fet
|
|
|
126
126
|
if (message.error) console.warn('ERROR RESPONSE', message)
|
|
127
127
|
|
|
128
128
|
if (!authed) {
|
|
129
|
+
// TODO: credential refresh flow instead of forcing login
|
|
130
|
+
if (message.error) return login()
|
|
131
|
+
|
|
129
132
|
authed = true
|
|
130
133
|
if (!user) { // this is the first authed websocket connection
|
|
131
134
|
user = message.auth.user
|