@cobaltio/cobalt-js 7.0.0 → 7.0.1
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/README.md +1 -0
- package/cobalt.js +2 -1
- package/docs.md +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -217,6 +217,7 @@ An application in Cobalt.
|
|
|
217
217
|
| [slug] | <code>String</code> | The application slug for custom apps. |
|
|
218
218
|
| auth_type | <code>"oauth2"</code> \| <code>"keybased"</code> | The type of auth used by application. |
|
|
219
219
|
| [connected] | <code>Boolean</code> | Whether the user has connected the application. |
|
|
220
|
+
| [reauth_required] | <code>Boolean</code> | Whether the connection has expired and re-auth is required. |
|
|
220
221
|
| [auth_input_map] | [<code>Array.<InputField></code>](#InputField) | The fields required from the user to connect the application (for `keybased` auth type). |
|
|
221
222
|
|
|
222
223
|
<a name="InputField"></a>
|
package/cobalt.js
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* @property {String} [slug] The application slug for custom apps.
|
|
12
12
|
* @property {"oauth2"|"keybased"} auth_type The type of auth used by application.
|
|
13
13
|
* @property {Boolean} [connected] Whether the user has connected the application.
|
|
14
|
+
* @property {Boolean} [reauth_required] Whether the connection has expired and re-auth is required.
|
|
14
15
|
* @property {InputField[]} [auth_input_map] The fields required from the user to connect the application (for `keybased` auth type).
|
|
15
16
|
*/
|
|
16
17
|
|
|
@@ -153,7 +154,7 @@ class Cobalt {
|
|
|
153
154
|
const interval = setInterval(() => {
|
|
154
155
|
this.getApp(slug)
|
|
155
156
|
.then(app => {
|
|
156
|
-
if (app && app.connected === true) {
|
|
157
|
+
if (app && app.connected === true && !app.reauth_required) {
|
|
157
158
|
// close auth window
|
|
158
159
|
connectWindow && connectWindow.close();
|
|
159
160
|
// clear interval
|
package/docs.md
CHANGED
|
@@ -159,6 +159,7 @@ An application in Cobalt.
|
|
|
159
159
|
| [slug] | <code>String</code> | The application slug for custom apps. |
|
|
160
160
|
| auth_type | <code>"oauth2"</code> \| <code>"keybased"</code> | The type of auth used by application. |
|
|
161
161
|
| [connected] | <code>Boolean</code> | Whether the user has connected the application. |
|
|
162
|
+
| [reauth_required] | <code>Boolean</code> | Whether the connection has expired and re-auth is required. |
|
|
162
163
|
| [auth_input_map] | [<code>Array.<InputField></code>](#InputField) | The fields required from the user to connect the application (for `keybased` auth type). |
|
|
163
164
|
|
|
164
165
|
<a name="InputField"></a>
|