@xsolla/backpack-js 1.9.2 → 1.9.3-rc.1

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.d.ts CHANGED
@@ -18,6 +18,13 @@ export declare function useItemById(itemId?: string): UseItemByIdResult;
18
18
  export declare function refetch(): Promise<void>;
19
19
  /** Remount the Backpack screen without reloading the host page. */
20
20
  export declare function reload(): void;
21
+ /**
22
+ * Call as the `reauthRedirectUri` page loads when that page does not mount
23
+ * `<xsolla-backpack>`. Returns true when the page is the Xsolla ID
24
+ * confirmation popup: the result is sent to the Backpack tab (and the popup
25
+ * closes once a code is sent), so the host should render nothing else.
26
+ */
27
+ export declare function handleReauthCallback(): boolean;
21
28
  export type {
22
29
  BackpackElementConfig,
23
30
  BackpackEnvironment,
package/dist/types.d.ts CHANGED
@@ -211,6 +211,19 @@ export interface BackpackElementConfig {
211
211
  * The same id does not open again until it is cleared and set once more.
212
212
  */
213
213
  openItem?: string;
214
+ /**
215
+ * Where Xsolla ID sends the confirmation popup after the player signs in
216
+ * again before a web3 action (`reauth-redirect-uri` attribute). Defaults to
217
+ * the page's origin with no path, which only works for a host that serves
218
+ * Backpack at its root.
219
+ *
220
+ * Must be an absolute URL on the same origin as the host page, registered
221
+ * on the Xsolla ID client, and the page there must either mount
222
+ * `<xsolla-backpack>` or call `handleReauthCallback()` as it loads. The
223
+ * popup arrives with only `?code=&state=`, so that page must load without
224
+ * any other token or query parameter.
225
+ */
226
+ reauthRedirectUri?: string;
214
227
  }
215
228
 
216
229
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/backpack-js",
3
- "version": "1.9.2",
3
+ "version": "1.9.3-rc.1",
4
4
  "description": "Framework-agnostic Xsolla Backpack Web Component — drop-in custom element for Angular, Vue, or vanilla HTML",
5
5
  "type": "module",
6
6
  "sideEffects": [