0.1.3 • Published 2 years ago

lucia-libsql-adapter v0.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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

2 years ago

0.1.4-beta.2

2 years ago

0.1.4-beta.1

2 years ago

0.2.0-beta

2 years ago

0.2.0-beta.2

2 years ago

0.2.0-beta.1

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago