@pb33f/cowboy-components 0.6.0 → 0.6.2
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/dist/controllers/auth.js +11 -7
- package/dist/cowboy-components.umd.cjs +279 -279
- package/package.json +2 -2
package/dist/controllers/auth.js
CHANGED
|
@@ -26,10 +26,20 @@ export class AuthController {
|
|
|
26
26
|
this.urlCapture = urlState;
|
|
27
27
|
sessionStorage.removeItem(PreAuthURL);
|
|
28
28
|
}
|
|
29
|
+
const startBroker = () => {
|
|
30
|
+
this.startSession().then((session) => {
|
|
31
|
+
this.session = session;
|
|
32
|
+
if (this.sessionCallback) {
|
|
33
|
+
// call back if defined.
|
|
34
|
+
this.sessionCallback.call(this.host, session);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
29
38
|
this.checkState().then((state) => {
|
|
30
39
|
this.authenticated = true;
|
|
31
40
|
this.state = state;
|
|
32
41
|
this.host.requestUpdate();
|
|
42
|
+
startBroker();
|
|
33
43
|
if (this.urlCapture) {
|
|
34
44
|
const c = this.urlCapture;
|
|
35
45
|
this.urlCapture = null;
|
|
@@ -37,13 +47,7 @@ export class AuthController {
|
|
|
37
47
|
}
|
|
38
48
|
}).catch(() => {
|
|
39
49
|
if (this.startSessionAutomatically) {
|
|
40
|
-
|
|
41
|
-
this.session = session;
|
|
42
|
-
if (this.sessionCallback) {
|
|
43
|
-
// call back if defined.
|
|
44
|
-
this.sessionCallback.call(this.host, session);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
50
|
+
startBroker();
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
53
|
}
|