limen-auth
v0.0.4
Published
Official TypeScript SDK for Limen, a composable Go auth library. Framework-agnostic core with React, Vue, Svelte, and Solid adapters.
Maintainers
Readme
Limen Auth
Official TypeScript client SDK for Limen — a modern, composable authentication library for Go. Framework-agnostic core with first-class React, Vue, Svelte, and Solid adapters.
Install
npm install limen-authQuick start
import { createAuthClient } from "limen-auth";
import { credentialPasswordPlugin } from "limen-auth/plugins/credential";
export const auth = createAuthClient({
baseURL: "http://localhost:8080", // your Limen server origin
plugins: [credentialPasswordPlugin()],
});
// `auth.$session` is a reactive store for the current user — it loads on its
// own, stays in sync across tabs, and updates whenever you sign in or out.
auth.$session.subscribe(({ data, isPending }) => {
if (isPending) return;
console.log(data ? `Signed in as ${data.user.email}` : "Signed out!");
});
// Mutations update `$session` automatically — no manual refetch.
await auth.signIn.credential({ credential: "[email protected]", password: "secret" });
await auth.signout();Using a framework? limen-auth/react, /vue, /svelte, and /solid give you a useSession() hook over the same store.
Documentation
Full guides, framework adapters (React, Vue, Svelte, Solid), the plugin catalog, and the complete API reference live at limenauth.dev.
