@bigso/auth-sdk 0.4.3 → 0.4.5
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.cjs +10 -5
- package/dist/index.js +10 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -183,8 +183,12 @@ var BigsoAuth = class extends EventEmitter {
|
|
|
183
183
|
this.debug("JWS v\xE1lido, payload:", decoded);
|
|
184
184
|
this.closeUI();
|
|
185
185
|
cleanup();
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
const result = {
|
|
187
|
+
...decoded,
|
|
188
|
+
signed_payload: payload.signed_payload
|
|
189
|
+
};
|
|
190
|
+
this.emit("success", result);
|
|
191
|
+
resolve(result);
|
|
188
192
|
} catch (err) {
|
|
189
193
|
this.debug("Error en sso-success:", err);
|
|
190
194
|
this.closeUI();
|
|
@@ -351,12 +355,13 @@ var BigsoAuth = class extends EventEmitter {
|
|
|
351
355
|
}
|
|
352
356
|
// ─── Helpers ──────────────────────────────────────────────────────
|
|
353
357
|
buildFallbackUrl() {
|
|
354
|
-
const url = new URL(
|
|
355
|
-
url.searchParams.set("
|
|
356
|
-
url.searchParams.set("response_type", "code");
|
|
358
|
+
const url = new URL(this.options.ssoOrigin);
|
|
359
|
+
url.searchParams.set("app_id", this.options.clientId);
|
|
357
360
|
url.searchParams.set("redirect_uri", this.options.redirectUri || window.location.origin);
|
|
361
|
+
url.searchParams.set("response_type", "code");
|
|
358
362
|
url.searchParams.set("state", generateRandomId());
|
|
359
363
|
url.searchParams.set("code_challenge_method", "S256");
|
|
364
|
+
url.searchParams.set("client_id", this.options.clientId);
|
|
360
365
|
return url.toString();
|
|
361
366
|
}
|
|
362
367
|
debug(...args) {
|
package/dist/index.js
CHANGED
|
@@ -157,8 +157,12 @@ var BigsoAuth = class extends EventEmitter {
|
|
|
157
157
|
this.debug("JWS v\xE1lido, payload:", decoded);
|
|
158
158
|
this.closeUI();
|
|
159
159
|
cleanup();
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const result = {
|
|
161
|
+
...decoded,
|
|
162
|
+
signed_payload: payload.signed_payload
|
|
163
|
+
};
|
|
164
|
+
this.emit("success", result);
|
|
165
|
+
resolve(result);
|
|
162
166
|
} catch (err) {
|
|
163
167
|
this.debug("Error en sso-success:", err);
|
|
164
168
|
this.closeUI();
|
|
@@ -325,12 +329,13 @@ var BigsoAuth = class extends EventEmitter {
|
|
|
325
329
|
}
|
|
326
330
|
// ─── Helpers ──────────────────────────────────────────────────────
|
|
327
331
|
buildFallbackUrl() {
|
|
328
|
-
const url = new URL(
|
|
329
|
-
url.searchParams.set("
|
|
330
|
-
url.searchParams.set("response_type", "code");
|
|
332
|
+
const url = new URL(this.options.ssoOrigin);
|
|
333
|
+
url.searchParams.set("app_id", this.options.clientId);
|
|
331
334
|
url.searchParams.set("redirect_uri", this.options.redirectUri || window.location.origin);
|
|
335
|
+
url.searchParams.set("response_type", "code");
|
|
332
336
|
url.searchParams.set("state", generateRandomId());
|
|
333
337
|
url.searchParams.set("code_challenge_method", "S256");
|
|
338
|
+
url.searchParams.set("client_id", this.options.clientId);
|
|
334
339
|
return url.toString();
|
|
335
340
|
}
|
|
336
341
|
debug(...args) {
|