@passflow/core 0.49.3 → 0.49.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/index.d.cts CHANGED
@@ -1624,6 +1624,8 @@ export type PassflowUserPayload = {
1624
1624
  email: string;
1625
1625
  } | {
1626
1626
  phone_number: string;
1627
+ } | {
1628
+ username: string;
1627
1629
  });
1628
1630
  export type PassflowSignUpPayload = {
1629
1631
  user: PassflowUserPayload;
@@ -7378,12 +7380,11 @@ export declare class Passflow {
7378
7380
  */
7379
7381
  signIn(payload: PassflowSignInPayload, options?: PassflowAuthOptions): Promise<PassflowAuthorizationResponse>;
7380
7382
  /**
7381
- * Register a new user account with email and password.
7383
+ * Register a new user account with a password.
7382
7384
  *
7383
7385
  * @param payload - Registration details
7384
- * @param payload.email - User's email address
7385
- * @param payload.password - User's password
7386
- * @param payload.username - Optional username
7386
+ * @param payload.user - The new user: `password` and at least one of `email`, `phone_number` or
7387
+ * `username`. A username alone is enough.
7387
7388
  * @param payload.scopes - Optional scopes to request
7388
7389
  * @returns Promise with authorization response containing tokens
7389
7390
  * May answer an email verification step instead of tokens: check it with
@@ -7394,9 +7395,7 @@ export declare class Passflow {
7394
7395
  * ```typescript
7395
7396
  * try {
7396
7397
  * const response = await passflow.signUp({
7397
- * email: 'newuser@example.com',
7398
- * password: 'secure-password',
7399
- * username: 'newuser'
7398
+ * user: { username: 'newuser', password: 'secure-password' },
7400
7399
  * });
7401
7400
  * console.log('Account created', response.access_token);
7402
7401
  * } catch (error) {
package/dist/index.d.ts CHANGED
@@ -1624,6 +1624,8 @@ export type PassflowUserPayload = {
1624
1624
  email: string;
1625
1625
  } | {
1626
1626
  phone_number: string;
1627
+ } | {
1628
+ username: string;
1627
1629
  });
1628
1630
  export type PassflowSignUpPayload = {
1629
1631
  user: PassflowUserPayload;
@@ -7378,12 +7380,11 @@ export declare class Passflow {
7378
7380
  */
7379
7381
  signIn(payload: PassflowSignInPayload, options?: PassflowAuthOptions): Promise<PassflowAuthorizationResponse>;
7380
7382
  /**
7381
- * Register a new user account with email and password.
7383
+ * Register a new user account with a password.
7382
7384
  *
7383
7385
  * @param payload - Registration details
7384
- * @param payload.email - User's email address
7385
- * @param payload.password - User's password
7386
- * @param payload.username - Optional username
7386
+ * @param payload.user - The new user: `password` and at least one of `email`, `phone_number` or
7387
+ * `username`. A username alone is enough.
7387
7388
  * @param payload.scopes - Optional scopes to request
7388
7389
  * @returns Promise with authorization response containing tokens
7389
7390
  * May answer an email verification step instead of tokens: check it with
@@ -7394,9 +7395,7 @@ export declare class Passflow {
7394
7395
  * ```typescript
7395
7396
  * try {
7396
7397
  * const response = await passflow.signUp({
7397
- * email: 'newuser@example.com',
7398
- * password: 'secure-password',
7399
- * username: 'newuser'
7398
+ * user: { username: 'newuser', password: 'secure-password' },
7400
7399
  * });
7401
7400
  * console.log('Account created', response.access_token);
7402
7401
  * } catch (error) {
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ var a = "__passflowAntiBot", o = (e, t) => {
11
11
  if (typeof e != "object" || !e) return;
12
12
  let t = e[a];
13
13
  return typeof t == "object" && t ? t : void 0;
14
- }, c = "0.49.3", l = "X-Passflow-Clientid", u = "Authorization", d = "X-Passflow-DeviceId", f = "X-Passflow-DeviceType", p = "X-Passflow-Anti-Bot", m = "X-Passflow-Agent-Tool", h = "X-Passflow-Device-Proof", g = "X-Passflow-Fingerprint-Event", _ = "X-Passflow-Stytch-Telemetry", v = "passflow_auth", y = c, b = [
14
+ }, c = "0.49.4", l = "X-Passflow-Clientid", u = "Authorization", d = "X-Passflow-DeviceId", f = "X-Passflow-DeviceType", p = "X-Passflow-Anti-Bot", m = "X-Passflow-Agent-Tool", h = "X-Passflow-Device-Proof", g = "X-Passflow-Fingerprint-Event", _ = "X-Passflow-Stytch-Telemetry", v = "passflow_auth", y = c, b = [
15
15
  "id",
16
16
  "offline",
17
17
  "openid"