Authentication library for SupaApps projects. Current version 3.2.2, providing token management, OAuth login flows (Google), and token validation. It uses a singleton pattern via AuthManager and supports ESM imports with TypeScript types included. Differentiators include simple API with login URI generation, access token decoding, and Bearer token validation. Release cadence is not specified but likely follows SupaApps updates.
npm install supaapps-authVerified import paths — ran on the pinned version, not inferred.
Initializes AuthManager with API URL, tenant, redirect URI and redirect callback; checks login status, gets Google login URI, and logs out.
Ensure token is stored via setAccessToken() or login flow.
Use AuthManager.getInstance() after initial construction, or consistently use constructor without getInstance.
Use AuthManager.validateToken() as shown, but monitor for replacement.
Assign window.location.href to the URI, or use an anchor tag.
Run npm install supaapps-auth and ensure tsconfig.json includes 'node_modules/@types' or the package's types.
Use import { AuthManager } from 'supaapps-auth' instead of import AuthManager from 'supaapps-auth'.Ensure AuthManager is instantiated or getInstance() is called after construction.
No dependency data recorded yet.