0.1.3 • Published 11 months ago
lucia-libsql-adapter v0.1.3
Lucia libSQL Adapter
An unofficial libSQL adapter for Lucia.
Code Sample
Here is an example of using the adapter with a Turso database in SvelteKit.
// src/lib/server/auth.ts
import lucia from 'lucia-auth';
import { sveltekit } from 'lucia-auth/middleware';
import { libsql } from 'lucia-libsql-adapter';
import { createClient } from '@libsql/client';
import { dev } from '$app/environment';
import { DATABASE_URL, DATABASE_AUTH_TOKEN } from '$env/static/private';
const db = createClient({
url: DATABASE_URL,
authToken: DATABASE_AUTH_TOKEN
});
export const auth = lucia({
adapter: libsql(db),
env: dev ? 'DEV' : 'PROD',
middleware: sveltekit(),
});
Installation
npm i lucia-libsql-adapter
pnpm add lucia-libsql-adapter
Attributions
Most of this package was just me copy pasting from the SQLite adapter and making changes where needed.
Credit goes to the creator of Lucia. Check out his work. It's awesome.
0.1.4-beta.3
11 months ago
0.1.4-beta.2
11 months ago
0.1.4-beta.1
11 months ago
0.2.0-beta
11 months ago
0.2.0-beta.2
11 months ago
0.2.0-beta.1
11 months ago
0.1.3
11 months ago
0.1.2
11 months ago
0.1.1
11 months ago
0.1.0
11 months ago