@saasbase-io/core-elements 1.1.16 → 1.1.17
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -508,26 +508,31 @@ class pn {
|
|
|
508
508
|
*/
|
|
509
509
|
startNewFlow(t) {
|
|
510
510
|
return F(this, void 0, void 0, function* () {
|
|
511
|
-
const r = zt.getConfig(), i = {
|
|
511
|
+
const r = zt.getConfig(), i = new URLSearchParams(this.location.search), o = {};
|
|
512
|
+
i.forEach((u, p) => {
|
|
513
|
+
o[p] = u;
|
|
514
|
+
}), console.log("metadata", o);
|
|
515
|
+
const s = {
|
|
512
516
|
app_id: r.appId,
|
|
513
517
|
client_secret: r.clientSecret,
|
|
514
518
|
origin_url: this.location.href,
|
|
515
519
|
signin_url: r.signinUrl,
|
|
516
520
|
signup_url: r.signupUrl,
|
|
517
521
|
locale: r.locale || "en",
|
|
518
|
-
flow_id: this.determineFlowId(t)
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
flow_id: this.determineFlowId(t),
|
|
523
|
+
metadata: o
|
|
524
|
+
}, a = yield this.startFlow(t, s);
|
|
525
|
+
if (!a.auth_result) {
|
|
526
|
+
this.flowStateManager.saveFlowState(t, s.flow_id, a);
|
|
527
|
+
const u = this.flowStateManager.getFlowState();
|
|
528
|
+
u && this.flowEventBus.emit("flow:started", { flowState: u });
|
|
524
529
|
}
|
|
525
530
|
return {
|
|
526
531
|
flowType: t,
|
|
527
532
|
isResumed: !1,
|
|
528
|
-
state:
|
|
529
|
-
render_spec:
|
|
530
|
-
auth_result:
|
|
533
|
+
state: a.state,
|
|
534
|
+
render_spec: a.render_spec,
|
|
535
|
+
auth_result: a.auth_result
|
|
531
536
|
};
|
|
532
537
|
});
|
|
533
538
|
}
|