@rool-dev/extension 0.4.2 → 0.4.3-dev.b3c8b24
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 +17 -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.
|
|
@@ -5794,6 +5795,7 @@ var GraphQLClient = class {
|
|
|
5794
5795
|
id
|
|
5795
5796
|
email
|
|
5796
5797
|
name
|
|
5798
|
+
photoUrl
|
|
5797
5799
|
slug
|
|
5798
5800
|
plan
|
|
5799
5801
|
creditsBalance
|
|
@@ -5813,6 +5815,7 @@ var GraphQLClient = class {
|
|
|
5813
5815
|
id
|
|
5814
5816
|
email
|
|
5815
5817
|
name
|
|
5818
|
+
photoUrl
|
|
5816
5819
|
slug
|
|
5817
5820
|
plan
|
|
5818
5821
|
creditsBalance
|
|
@@ -8668,15 +8671,16 @@ var RoolClient = class extends EventEmitter {
|
|
|
8668
8671
|
* Initiate login by redirecting to auth page.
|
|
8669
8672
|
* @param appName - The name of the application requesting login (displayed on auth page)
|
|
8670
8673
|
*/
|
|
8671
|
-
async login(appName) {
|
|
8672
|
-
return this.authManager.login(appName);
|
|
8674
|
+
async login(appName, params) {
|
|
8675
|
+
return this.authManager.login(appName, params);
|
|
8673
8676
|
}
|
|
8674
8677
|
/**
|
|
8675
8678
|
* Initiate signup by redirecting to auth page.
|
|
8676
8679
|
* @param appName - The name of the application requesting signup (displayed on auth page)
|
|
8680
|
+
* @param params - Optional additional query parameters to pass to the auth server
|
|
8677
8681
|
*/
|
|
8678
|
-
async signup(appName) {
|
|
8679
|
-
return this.authManager.signup(appName);
|
|
8682
|
+
async signup(appName, params) {
|
|
8683
|
+
return this.authManager.signup(appName, params);
|
|
8680
8684
|
}
|
|
8681
8685
|
/**
|
|
8682
8686
|
* Logout - clear all tokens and state.
|