Ankhem Auth is a minimal authentication component for JavaScript/TypeScript applications, part of the Ankhem ecosystem. Current stable version 0.0.25. Released irregularly as a pre-1.0 package. It provides basic auth utilities (login, logout, token management) with a small API surface. Differentiators: zero-dependency design (except Ankhem core), simple token storage abstraction, and TypeScript definitions included. Not recommended for production without careful review due to early stage.
npm install ankhem-authVerified import paths — ran on the pinned version, not inferred.
Creates an Auth instance, logs in with credentials, logs out, and retrieves the current token.
Always pass a persistent storage like localStorage as shown in quickstart.
Update code to expect an object instead of a string: response.token vs response.
Replace setToken() calls with updateToken() with same arguments.
Call new Auth({ storage: localStorage, tokenKey: 'token' }) with options object.Instantiate Auth first: const auth = new Auth(config); then auth.login(...).
Update TypeScript types: use response.user or response.token.
No dependency data recorded yet.