Skip to main content
@glinr/theauth-client ships createSessionStore (plain state, subscribe, sign in and out) and createSolidAuth, which turns the store into Solid accessors. Pass in the two Solid primitives you already import. The client takes no dependency on solid-js, so it works with any 1.x release.
Call store.refresh() once on the client. It reads GET {basePath}/auth/session (cookie or stored bearer token) and shows a saved session while it waits. store.signIn(identifier, password) and store.signUp(identifier, password, name) post to /auth/username/sign-in and /auth/username/sign-up by default (/auth/email/sign-in and /auth/email/sign-up with emailPassword: true, see Client SDK) and return { success: true } or { success: false, error, code? }. store.signOut() clears local state, then revokes the session with POST {basePath}/auth/sign-out. To refetch on focus or an interval, pass refetch to createSessionStore, see Session refetch and SSR. createSolidAuth also returns refresh and hydrateSession. The store uses fetch only, so it runs in browsers, workers and edge runtimes. Without a storage, the session lives in memory only.

What was run

The lib/auth.ts code type checks under strict against solid-js 1.x types and runs under createRoot in Node. Store behavior is covered by packages/client/tests/session-store-solid.test.ts. No browser run of the JSX.
Last modified on October 19, 2026