basalt / auth-sqlite/src / sqliteAuthStores
Function: sqliteAuthStores()
> sqliteAuthStores(dbOrLocation?): SqliteAuthStores
Defined in: auth-sqlite/src/index.ts:852
Open a database (or reuse a DatabaseSync you already have) and return every auth store wired to it, named to drop straight into authPlugin / apiKeysPlugin:
ts
const s = sqliteAuthStores('./data/auth.db')
authPlugin({ users: s.users, sessions: s.sessions, refreshTokens: s.refreshTokens,
tokens: s.tokens, mfa: s.mfa, accountLinks: s.accountLinks, secret })
apiKeysPlugin({ store: s.apiKeys, users: s.users })
webauthnPlugin({ config, verifier, credentials: s.passkeys })Parameters
dbOrLocation?
string | DatabaseSync