@ingram-tech/nk-auth 0.19.0 → 0.19.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/README.md +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -159,6 +159,20 @@ database applies 0002 and 0003 back to back, and where 0002 refuses a provider,
|
|
|
159
159
|
set `issuer` to any placeholder: the value is never read again. Dropping the
|
|
160
160
|
column is a later, optional delta, possible once no 1.7.2 site remains.
|
|
161
161
|
|
|
162
|
+
**From 1.7.5, Better Auth checks the schema before every endpoint.** The first
|
|
163
|
+
call into any endpoint, `getSession` included, compares the database with what
|
|
164
|
+
the configuration writes, and while it fails every auth call throws "Database
|
|
165
|
+
schema mismatch". It fails on a missing table or column, and also on a column
|
|
166
|
+
Better Auth does not write that is NOT NULL with no default. So a site that
|
|
167
|
+
owns its auth tables in its own chain (not this shipped one) must make sure no
|
|
168
|
+
such column survives: a 0002-style NOT NULL `account.issuer` with no 0003-style
|
|
169
|
+
relax breaks sign-in outright, not just sign-up. The check runs once per
|
|
170
|
+
process and caches a clean result. It needs a database: a unit test that
|
|
171
|
+
reaches a real `getSession` without one now throws instead of returning
|
|
172
|
+
`null`, so mock the session seam there. `advanced.database.validateSchema:
|
|
173
|
+
false` turns the check off, but it is the guard that turns this drift into a
|
|
174
|
+
loud error instead of failed inserts, so keep it on in production.
|
|
175
|
+
|
|
162
176
|
> **Adopting from the old copy-in model?** Earlier versions told you to `cp` the
|
|
163
177
|
> baseline into your own `drizzle/` chain. If you already did, keep that file
|
|
164
178
|
> (deleting an applied migration causes journal drift) and just add the auth-chain
|
package/package.json
CHANGED