@rool-dev/extension 0.4.2-dev.fef3465 → 0.4.3-dev.3ae842a
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/dev/host-shell.js +15 -13
- package/dist/dev/host-shell.js.map +1 -1
- package/package.json +2 -2
package/dist/dev/host-shell.js
CHANGED
|
@@ -4556,21 +4556,22 @@ var BrowserAuthProvider = class {
|
|
|
4556
4556
|
* Initiate login by redirecting to auth page.
|
|
4557
4557
|
* @param appName - The name of the application requesting login (displayed on auth page)
|
|
4558
4558
|
*/
|
|
4559
|
-
login(appName) {
|
|
4560
|
-
this.redirectToAuth("login", appName);
|
|
4559
|
+
login(appName, params) {
|
|
4560
|
+
this.redirectToAuth("login", appName, params);
|
|
4561
4561
|
}
|
|
4562
4562
|
/**
|
|
4563
4563
|
* Initiate signup by redirecting to auth page.
|
|
4564
4564
|
* @param appName - The name of the application requesting signup (displayed on auth page)
|
|
4565
4565
|
*/
|
|
4566
|
-
signup(appName) {
|
|
4567
|
-
this.redirectToAuth("signup", appName);
|
|
4566
|
+
signup(appName, params) {
|
|
4567
|
+
this.redirectToAuth("signup", appName, params);
|
|
4568
4568
|
}
|
|
4569
|
-
redirectToAuth(flow, appName) {
|
|
4569
|
+
redirectToAuth(flow, appName, params) {
|
|
4570
4570
|
const url = new URL(`${this.authBaseUrl}/${flow}`);
|
|
4571
4571
|
const redirectTarget = window.location.origin + window.location.pathname + window.location.search;
|
|
4572
4572
|
url.searchParams.set("redirect_uri", redirectTarget);
|
|
4573
4573
|
url.searchParams.set("app_name", appName);
|
|
4574
|
+
if (params) for (const [key, value] of Object.entries(params)) url.searchParams.set(key, value);
|
|
4574
4575
|
const state = this.generateState();
|
|
4575
4576
|
this.storeState(state);
|
|
4576
4577
|
url.searchParams.set("state", state);
|
|
@@ -4843,15 +4844,15 @@ var AuthManager = class {
|
|
|
4843
4844
|
* Initiate login.
|
|
4844
4845
|
* @param appName - The name of the application requesting login (displayed on auth page)
|
|
4845
4846
|
*/
|
|
4846
|
-
login(appName) {
|
|
4847
|
-
return this.provider.login(appName);
|
|
4847
|
+
login(appName, params) {
|
|
4848
|
+
return this.provider.login(appName, params);
|
|
4848
4849
|
}
|
|
4849
4850
|
/**
|
|
4850
4851
|
* Initiate signup.
|
|
4851
4852
|
* @param appName - The name of the application requesting signup (displayed on auth page)
|
|
4852
4853
|
*/
|
|
4853
|
-
signup(appName) {
|
|
4854
|
-
return this.provider.signup(appName);
|
|
4854
|
+
signup(appName, params) {
|
|
4855
|
+
return this.provider.signup(appName, params);
|
|
4855
4856
|
}
|
|
4856
4857
|
/**
|
|
4857
4858
|
* Logout - clear all tokens and state.
|
|
@@ -8668,15 +8669,16 @@ var RoolClient = class extends EventEmitter {
|
|
|
8668
8669
|
* Initiate login by redirecting to auth page.
|
|
8669
8670
|
* @param appName - The name of the application requesting login (displayed on auth page)
|
|
8670
8671
|
*/
|
|
8671
|
-
async login(appName) {
|
|
8672
|
-
return this.authManager.login(appName);
|
|
8672
|
+
async login(appName, params) {
|
|
8673
|
+
return this.authManager.login(appName, params);
|
|
8673
8674
|
}
|
|
8674
8675
|
/**
|
|
8675
8676
|
* Initiate signup by redirecting to auth page.
|
|
8676
8677
|
* @param appName - The name of the application requesting signup (displayed on auth page)
|
|
8678
|
+
* @param params - Optional additional query parameters to pass to the auth server
|
|
8677
8679
|
*/
|
|
8678
|
-
async signup(appName) {
|
|
8679
|
-
return this.authManager.signup(appName);
|
|
8680
|
+
async signup(appName, params) {
|
|
8681
|
+
return this.authManager.signup(appName, params);
|
|
8680
8682
|
}
|
|
8681
8683
|
/**
|
|
8682
8684
|
* Logout - clear all tokens and state.
|