auth
Auth management — adapter, store, and state.
From swoff/auth/.
adapter
createAuthAdapter factory with getAuth, getHeaders, refresh, fetchUser.
setAuth
Store auth data in memory and IndexedDB.
getAuth
Get auth data from memory, adapter, or IndexedDB.
clearAuth
Clear auth from memory, IndexedDB, and SW caches.
clearMemoryAuth
Null memory auth (cross-tab sync).
isAuthValid
Check if auth exists and is not expired.
ensureValidAuth
Get auth, returns null if invalid.
withAuthHeaders
Inject auth headers into a Headers object.
getAuthState
Detect current auth state across online/offline x authenticated/not.