@aooth/user 0.1.2 → 0.1.3
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.cjs +8 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +8 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -339,6 +339,14 @@ var UserService = class {
|
|
|
339
339
|
this.hasher = new PasswordHasher(this.config.password);
|
|
340
340
|
}
|
|
341
341
|
/**
|
|
342
|
+
* Creates a user with `account.active: false`. The invite workflow relies
|
|
343
|
+
* on this default (see `InviteWorkflow.acceptInvite` — pending invitees stay
|
|
344
|
+
* inactive until they accept). For setup scripts / seeders / tests that
|
|
345
|
+
* don't go through invite, follow up with `activateAccount(username)` or
|
|
346
|
+
* `login()` will throw `UserAuthError("INACTIVE")` — which the login
|
|
347
|
+
* workflow deliberately re-maps to `"Invalid credentials"` to avoid account
|
|
348
|
+
* enumeration, so the failure is silent client-side.
|
|
349
|
+
*
|
|
342
350
|
* @param extras Optional partial user fields merged AFTER the base
|
|
343
351
|
* `UserCredentials` shape, so callers can populate consumer-specific
|
|
344
352
|
* required fields (e.g. `tenantId`) without subclassing the store.
|
package/dist/index.d.cts
CHANGED
|
@@ -50,6 +50,14 @@ declare class UserService<T extends object = object> {
|
|
|
50
50
|
protected readonly hasher: PasswordHasher;
|
|
51
51
|
constructor(store: UserStore<T>, config?: UserServiceConfig);
|
|
52
52
|
/**
|
|
53
|
+
* Creates a user with `account.active: false`. The invite workflow relies
|
|
54
|
+
* on this default (see `InviteWorkflow.acceptInvite` — pending invitees stay
|
|
55
|
+
* inactive until they accept). For setup scripts / seeders / tests that
|
|
56
|
+
* don't go through invite, follow up with `activateAccount(username)` or
|
|
57
|
+
* `login()` will throw `UserAuthError("INACTIVE")` — which the login
|
|
58
|
+
* workflow deliberately re-maps to `"Invalid credentials"` to avoid account
|
|
59
|
+
* enumeration, so the failure is silent client-side.
|
|
60
|
+
*
|
|
53
61
|
* @param extras Optional partial user fields merged AFTER the base
|
|
54
62
|
* `UserCredentials` shape, so callers can populate consumer-specific
|
|
55
63
|
* required fields (e.g. `tenantId`) without subclassing the store.
|
package/dist/index.d.mts
CHANGED
|
@@ -50,6 +50,14 @@ declare class UserService<T extends object = object> {
|
|
|
50
50
|
protected readonly hasher: PasswordHasher;
|
|
51
51
|
constructor(store: UserStore<T>, config?: UserServiceConfig);
|
|
52
52
|
/**
|
|
53
|
+
* Creates a user with `account.active: false`. The invite workflow relies
|
|
54
|
+
* on this default (see `InviteWorkflow.acceptInvite` — pending invitees stay
|
|
55
|
+
* inactive until they accept). For setup scripts / seeders / tests that
|
|
56
|
+
* don't go through invite, follow up with `activateAccount(username)` or
|
|
57
|
+
* `login()` will throw `UserAuthError("INACTIVE")` — which the login
|
|
58
|
+
* workflow deliberately re-maps to `"Invalid credentials"` to avoid account
|
|
59
|
+
* enumeration, so the failure is silent client-side.
|
|
60
|
+
*
|
|
53
61
|
* @param extras Optional partial user fields merged AFTER the base
|
|
54
62
|
* `UserCredentials` shape, so callers can populate consumer-specific
|
|
55
63
|
* required fields (e.g. `tenantId`) without subclassing the store.
|
package/dist/index.mjs
CHANGED
|
@@ -338,6 +338,14 @@ var UserService = class {
|
|
|
338
338
|
this.hasher = new PasswordHasher(this.config.password);
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
341
|
+
* Creates a user with `account.active: false`. The invite workflow relies
|
|
342
|
+
* on this default (see `InviteWorkflow.acceptInvite` — pending invitees stay
|
|
343
|
+
* inactive until they accept). For setup scripts / seeders / tests that
|
|
344
|
+
* don't go through invite, follow up with `activateAccount(username)` or
|
|
345
|
+
* `login()` will throw `UserAuthError("INACTIVE")` — which the login
|
|
346
|
+
* workflow deliberately re-maps to `"Invalid credentials"` to avoid account
|
|
347
|
+
* enumeration, so the failure is silent client-side.
|
|
348
|
+
*
|
|
341
349
|
* @param extras Optional partial user fields merged AFTER the base
|
|
342
350
|
* `UserCredentials` shape, so callers can populate consumer-specific
|
|
343
351
|
* required fields (e.g. `tenantId`) without subclassing the store.
|