A build your own ATProto adventure, OAuth already figured out for you.
at main 19 lines 647 B view raw
1import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'; 2 3export const keyValueStore = sqliteTable('key_value_store', { 4 key: text('key').primaryKey(), 5 value: text('value'), 6 storeName: text('storeName'), 7 createdAt: integer({ mode: 'timestamp' }) // Date 8}); 9 10 11export const sessionStore = sqliteTable('session_store', { 12 id: text('id').primaryKey(), 13 //Not leaving unique since it could be multiple logins from the same user across browsers 14 did: text('did').notNull(), 15 handle: text('handle').notNull(), 16 createdAt: integer({ mode: 'timestamp' }).notNull(), // Date 17 expiresAt: integer({ mode: 'timestamp' }).notNull() // Date 18 19});