@muhkoo/connect 0.7.0-alpha.3 → 0.7.0-alpha.4

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/connect.d.ts CHANGED
@@ -2316,6 +2316,16 @@ declare class HostedAuth {
2316
2316
  redirectUri: string;
2317
2317
  redirect?: boolean;
2318
2318
  }): Promise<string>;
2319
+ /**
2320
+ * (App side) Send the user to centralized account & security management on
2321
+ * the hosted page (auth.muhkoo.dev/security) — manage passkeys, recovery
2322
+ * phrase, email, Google, change password, and remove login methods, all in
2323
+ * one place. `returnUri` (default: the current URL) gives the hosted page a
2324
+ * "Back to app" target. Redirects the browser; resolves to the URL.
2325
+ */
2326
+ manageAccount(opts?: {
2327
+ returnUri?: string;
2328
+ }): Promise<string>;
2319
2329
  /** Whether the current URL looks like a hosted-auth callback (has code + state). */
2320
2330
  isCallback(): boolean;
2321
2331
  /**
@@ -2969,7 +2969,7 @@ function base64UrlDecode(s) {
2969
2969
  * expect (and isn't serving a stale cached bundle). Keep this in sync with
2970
2970
  * `package.json` `version`.
2971
2971
  */
2972
- const VERSION = "0.7.0-alpha.3";
2972
+ const VERSION = "0.7.0-alpha.4";
2973
2973
 
2974
2974
  /**
2975
2975
  * `HttpClient` — the one place the unified {@link Client} talks to the
@@ -3529,6 +3529,19 @@ class HostedAuth {
3529
3529
  this.location().assign(url);
3530
3530
  return url;
3531
3531
  }
3532
+ /**
3533
+ * (App side) Send the user to centralized account & security management on
3534
+ * the hosted page (auth.muhkoo.dev/security) — manage passkeys, recovery
3535
+ * phrase, email, Google, change password, and remove login methods, all in
3536
+ * one place. `returnUri` (default: the current URL) gives the hosted page a
3537
+ * "Back to app" target. Redirects the browser; resolves to the URL.
3538
+ */
3539
+ async manageAccount(opts = {}) {
3540
+ const ret = opts.returnUri ?? this.location().href;
3541
+ const url = `${this.deps.authBaseUrl}/security?` + new URLSearchParams({ return: ret }).toString();
3542
+ this.location().assign(url);
3543
+ return url;
3544
+ }
3532
3545
  /** Whether the current URL looks like a hosted-auth callback (has code + state). */
3533
3546
  isCallback() {
3534
3547
  try {