@substrat-run/vertical-auth 0.25.3 → 0.26.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 +8 -10
- package/dist/cookie-domain.d.ts +0 -7
- package/dist/cookie-domain.d.ts.map +1 -1
- package/dist/cookie-domain.js +0 -25
- package/dist/cookie-domain.js.map +1 -1
- package/dist/identity-do.d.ts +2 -33
- package/dist/identity-do.d.ts.map +1 -1
- package/dist/identity-do.js +6 -143
- package/dist/identity-do.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/owner-seat.d.ts +1 -2
- package/dist/owner-seat.d.ts.map +1 -1
- package/dist/owner-seat.js +1 -2
- package/dist/owner-seat.js.map +1 -1
- package/dist/provider.d.ts +3 -4
- package/dist/provider.d.ts.map +1 -1
- package/dist/site-registry.d.ts +1 -1
- package/dist/site-registry.js +1 -1
- package/package.json +7 -7
- package/dist/auth-schema.d.ts +0 -655
- package/dist/auth-schema.d.ts.map +0 -1
- package/dist/auth-schema.js +0 -73
- package/dist/auth-schema.js.map +0 -1
package/dist/auth-schema.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { sqliteTable, text, integer, index } from 'drizzle-orm/sqlite-core';
|
|
2
|
-
import { sql } from 'drizzle-orm';
|
|
3
|
-
/**
|
|
4
|
-
* Better Auth's standard tables (user/session/account/verification) as a Drizzle schema,
|
|
5
|
-
* for the per-tenant identity DO's own SQLite. Timestamps are integer epoch-ms; the
|
|
6
|
-
* sub→principal binding is NOT here — it lives in the identity DO's own `identity` table,
|
|
7
|
-
* provider-agnostic (a login authenticated by OIDC has no Better Auth `user` row).
|
|
8
|
-
*/
|
|
9
|
-
export const user = sqliteTable('user', {
|
|
10
|
-
id: text('id').primaryKey(),
|
|
11
|
-
name: text('name').notNull(),
|
|
12
|
-
email: text('email').notNull().unique(),
|
|
13
|
-
emailVerified: integer('email_verified', { mode: 'boolean' }).default(false).notNull(),
|
|
14
|
-
image: text('image'),
|
|
15
|
-
createdAt: integer('created_at', { mode: 'timestamp_ms' })
|
|
16
|
-
.default(sql `(cast(unixepoch('subsecond') * 1000 as integer))`)
|
|
17
|
-
.notNull(),
|
|
18
|
-
updatedAt: integer('updated_at', { mode: 'timestamp_ms' })
|
|
19
|
-
.default(sql `(cast(unixepoch('subsecond') * 1000 as integer))`)
|
|
20
|
-
.$onUpdate(() => /* @__PURE__ */ new Date())
|
|
21
|
-
.notNull(),
|
|
22
|
-
});
|
|
23
|
-
export const session = sqliteTable('session', {
|
|
24
|
-
id: text('id').primaryKey(),
|
|
25
|
-
expiresAt: integer('expires_at', { mode: 'timestamp_ms' }).notNull(),
|
|
26
|
-
token: text('token').notNull().unique(),
|
|
27
|
-
createdAt: integer('created_at', { mode: 'timestamp_ms' })
|
|
28
|
-
.default(sql `(cast(unixepoch('subsecond') * 1000 as integer))`)
|
|
29
|
-
.notNull(),
|
|
30
|
-
updatedAt: integer('updated_at', { mode: 'timestamp_ms' })
|
|
31
|
-
.$onUpdate(() => /* @__PURE__ */ new Date())
|
|
32
|
-
.notNull(),
|
|
33
|
-
ipAddress: text('ip_address'),
|
|
34
|
-
userAgent: text('user_agent'),
|
|
35
|
-
userId: text('user_id')
|
|
36
|
-
.notNull()
|
|
37
|
-
.references(() => user.id, { onDelete: 'cascade' }),
|
|
38
|
-
}, (table) => [index('session_userId_idx').on(table.userId)]);
|
|
39
|
-
export const account = sqliteTable('account', {
|
|
40
|
-
id: text('id').primaryKey(),
|
|
41
|
-
accountId: text('account_id').notNull(),
|
|
42
|
-
providerId: text('provider_id').notNull(),
|
|
43
|
-
userId: text('user_id')
|
|
44
|
-
.notNull()
|
|
45
|
-
.references(() => user.id, { onDelete: 'cascade' }),
|
|
46
|
-
accessToken: text('access_token'),
|
|
47
|
-
refreshToken: text('refresh_token'),
|
|
48
|
-
idToken: text('id_token'),
|
|
49
|
-
accessTokenExpiresAt: integer('access_token_expires_at', { mode: 'timestamp_ms' }),
|
|
50
|
-
refreshTokenExpiresAt: integer('refresh_token_expires_at', { mode: 'timestamp_ms' }),
|
|
51
|
-
scope: text('scope'),
|
|
52
|
-
password: text('password'),
|
|
53
|
-
createdAt: integer('created_at', { mode: 'timestamp_ms' })
|
|
54
|
-
.default(sql `(cast(unixepoch('subsecond') * 1000 as integer))`)
|
|
55
|
-
.notNull(),
|
|
56
|
-
updatedAt: integer('updated_at', { mode: 'timestamp_ms' })
|
|
57
|
-
.$onUpdate(() => /* @__PURE__ */ new Date())
|
|
58
|
-
.notNull(),
|
|
59
|
-
}, (table) => [index('account_userId_idx').on(table.userId)]);
|
|
60
|
-
export const verification = sqliteTable('verification', {
|
|
61
|
-
id: text('id').primaryKey(),
|
|
62
|
-
identifier: text('identifier').notNull(),
|
|
63
|
-
value: text('value').notNull(),
|
|
64
|
-
expiresAt: integer('expires_at', { mode: 'timestamp_ms' }).notNull(),
|
|
65
|
-
createdAt: integer('created_at', { mode: 'timestamp_ms' })
|
|
66
|
-
.default(sql `(cast(unixepoch('subsecond') * 1000 as integer))`)
|
|
67
|
-
.notNull(),
|
|
68
|
-
updatedAt: integer('updated_at', { mode: 'timestamp_ms' })
|
|
69
|
-
.default(sql `(cast(unixepoch('subsecond') * 1000 as integer))`)
|
|
70
|
-
.$onUpdate(() => /* @__PURE__ */ new Date())
|
|
71
|
-
.notNull(),
|
|
72
|
-
}, (table) => [index('verification_identifier_idx').on(table.identifier)]);
|
|
73
|
-
//# sourceMappingURL=auth-schema.js.map
|
package/dist/auth-schema.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-schema.js","sourceRoot":"","sources":["../src/auth-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa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