@iskra-bun/auth-kit 0.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # @iskra-bun/auth-kit
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f9654df: Initial public release. Transport-agnostic authentication kit extracted from web-kit: the `createBetterAuth` config factory, the Drizzle auth schema (Postgres/MySQL/SQLite), and shared auth types — usable outside the HTTP layer.
8
+
9
+ ### Patch Changes
10
+
11
+ - Harden auth configuration: `createBetterAuth` now throws if the secret is empty or shorter than 32 characters, instead of silently starting with a weak secret. Generic OAuth providers also default `pkce` to `true` (an explicit `pkce: false` is still honored), so the PKCE protection is on unless deliberately disabled.
12
+ - Updated dependencies [f9654df]
13
+ - Updated dependencies
14
+ - Updated dependencies [f9654df]
15
+ - @iskra-bun/core@0.1.1
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @iskra-bun/auth-kit
2
+
3
+ Integracion de autenticacion de Iskra basada en [better-auth](https://www.better-auth.com/), agnostica del transporte.
4
+
5
+ Expone el setup portable de better-auth (la fabrica de configuracion, el esquema Drizzle de auth y los tipos compartidos) para que servicios que no son HTTP puedan reutilizar la logica de sesiones y autenticacion sin depender de Hono.
6
+
7
+ ## Instalacion
8
+
9
+ ```bash
10
+ bun add @iskra-bun/auth-kit @iskra-bun/core
11
+ ```
12
+
13
+ ## Uso rapido
14
+
15
+ ```typescript
16
+ import { createBetterAuth } from '@iskra-bun/auth-kit'
17
+
18
+ const auth = createBetterAuth({
19
+ db, // instancia de Drizzle
20
+ adapterType: 'postgres', // 'postgres' | 'mysql' | 'sqlite'
21
+ secret: process.env.AUTH_SECRET!,
22
+ })
23
+
24
+ // auth.handler / auth.api.getSession quedan disponibles para cualquier transporte
25
+ ```
26
+
27
+ El esquema Drizzle (`pgSchema`, `mysqlSchema`, `sqliteSchema`) y los tipos (`User`, `AuthSession`, ...) tambien se exportan para reutilizarlos en migraciones y handlers.
28
+
29
+ ## Documentacion
30
+
31
+ Guia completa: [docs/auth-kit.md](../../docs/auth-kit.md)
32
+
33
+ ## Licencia
34
+
35
+ AGPL-3.0-or-later