@ambushsoftworks/nestjs-auth-graphql 0.16.0-rc.3 → 0.16.0

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -27,6 +27,68 @@ for buried obligations. **The marker was introduced in 0.9.0 and has not been
27
27
  retro-applied**, so it is reliable from 0.9.0 onward only. Convention adopted
28
28
  from `@ambushsoftworks/nestjs-payments-graphql`.
29
29
 
30
+ ## [0.16.0] - 2026-10-01
31
+
32
+ Passkeys (WebAuthn), and step-up re-authentication to protect adding one.
33
+ Identical to `0.16.0-rc.3`, which LiftIQ piloted on a real Android Credential
34
+ Manager and against Postgres. This entry is the summary for anyone coming from
35
+ 0.15.x; the three release-candidate entries below have the detail.
36
+
37
+ **Nothing changes unless you enable passkeys**, with two exceptions noted
38
+ under Changed.
39
+
40
+ ### ⚠ External configuration required
41
+
42
+ Only if you enable passkeys (details: README, "Passkeys → Platform setup"):
43
+
44
+ - Install the optional peer `@simplewebauthn/server@^14`; it needs Node.js 20+.
45
+ - **Web:** the frontend on HTTPS at `passkey.rp.id` or a subdomain, its exact
46
+ origin listed in `passkey.rp.origins`.
47
+ - **Android:** `https://<rp.id>/.well-known/assetlinks.json` granting
48
+ `delegate_permission/common.get_login_creds`, and
49
+ `android:apk-key-hash:<base64url SHA-256 of the signing certificate>` in
50
+ `passkey.rp.origins`.
51
+ - **iOS:** `https://<rp.id>/.well-known/apple-app-site-association` with
52
+ `webcredentials.apps`, and `webcredentials:<rp.id>` in Associated Domains.
53
+ - **Database:** passkey credential and challenge tables
54
+ (`examples/passkeys/schema.prisma`), and the value `step-up` if your
55
+ verification repository stores its type in a database enum.
56
+
57
+ ### Added
58
+
59
+ - **Passkeys**: `PasskeyService`, `IPasskeyRepository`, 11 `perform*` methods
60
+ on `BaseAuthResolver`. Usernameless sign-in, browser autofill, user
61
+ verification required by default (configurable), realm-bound credentials.
62
+ - **Step-up re-authentication** (`StepUpService`): password, passkey or email
63
+ code, giving a five-minute token bound to user and realm and reusable until
64
+ it expires. **Required to add a passkey.**
65
+ - **Owner notification emails** when a passkey is added or removed, sent by
66
+ the package through optional `IEmailService` methods; turn off with
67
+ `passkey.emailNotifications`.
68
+ - **`@ambushsoftworks/nestjs-auth-graphql/testing`**:
69
+ `assertPasskeyRepositoryContract` (with `userIds`, `realms` and `cleanup`
70
+ for real databases) and `SoftwareAuthenticator`.
71
+ - **`examples/passkeys/`**: reference Prisma schema and adapter, verified with
72
+ the contract on PostgreSQL 16.
73
+ - Error codes `STEP_UP_FAILED`, `STEP_UP_REQUIRED`, `STEP_UP_UNAVAILABLE`,
74
+ `PASSKEY_AUTHENTICATION_FAILED`, `PASSKEY_ALREADY_REGISTERED`,
75
+ `CANNOT_REMOVE_LAST_AUTH_METHOD`. **Do not map `STEP_UP_FAILED` to a token
76
+ refresh**; it is not an expired session.
77
+
78
+ ### Changed
79
+
80
+ - `RepositoryVerificationType` includes `STEP_UP`. An adapter with an
81
+ exhaustive `switch` over it needs the new case.
82
+ - `BaseAuthResolver` gains protected members `authPasskeys` and `authStepUp`
83
+ (its constructor is unchanged). A subclass declaring members with those
84
+ names must rename them.
85
+
86
+ ### Upgrading from an RC
87
+
88
+ From rc.1, read the rc.2 entry: the error codes changed, and the package now
89
+ sends the passkey emails, so remove any you send from the hooks. From rc.2,
90
+ nothing breaks; the contract gained options. From rc.3, nothing changes.
91
+
30
92
  ## [0.16.0-rc.3] - 2026-10-01
31
93
 
32
94
  The repository contract from rc.2 could not run against a real schema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ambushsoftworks/nestjs-auth-graphql",
3
- "version": "0.16.0-rc.3",
3
+ "version": "0.16.0",
4
4
  "description": "Production-grade authentication package for NestJS with GraphQL, supporting JWT, OAuth, email/SMS verification, and biometric auth",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",