Repository navigation
Troubleshooting
A login crosses the application, browser and provider. Check each boundary in turn.
SessionNotStartedException means a core container was constructed without a request-scoped record, or Express lacks express-session. Use a runtime adapter or supply a container explicitly. Node.js has no equivalent automatic $_SESSION global.
Ensure the return route runs the wrapper or constructs Authenticator with its actual path and query. Check the same cookie arrives and the shared store still holds the login token. Cookies marked Secure are not sent over ordinary HTTP; use secureCookie: false only locally.
Responses without session data are removed without authenticating a visitor. A token-only session is a login in progress, not a logged-in user.
Construction, login and logout can all redirect. Return bodies from Node.js and Express handlers instead of writing headers yourself. Do not catch and swallow RedirectSignal. Next.js integration belongs in Node.js Route Handlers, not Client Components or Edge middleware.
Check deployment key, provider host and the token from the same exchange. A lost session, changed key or second concurrent login can make an old response unusable. The secret is 32 raw bytes, not base64-decoded data.
Cipher failures raise DecryptionFailureException; ResponseCipherDecryptionException is declared for PHP compatibility but is not used by the authenticator. Log through application error handling without logging secrets or encrypted URLs and offer a fresh login.
Call setReturnUri() before login. Otherwise the client requests its current URI. Root-relative and same-origin absolute URLs are supported by the provider; query-only and fragment-only login destinations use its configured return path. Invalid or external destinations fall back to that path. Ensure the destination runs authentication setup. See Provider configuration and return URIs.
Session restoration does not invoke the callback. The marker is stored before invocation, so throwing does not retry the callback on replay. Keep callbacks synchronous and arrange retries separately. See Responding to a new authentication.
Explicit logout destinations override configured return URIs. With neither supplied, the provider uses its default with do=logout. Query-only destinations use the current path. Do not call logout repeatedly on the signed-out route.
For signatures, see API reference.
Authwave’s TypeScript client connects your Node.js, Express or Next.js application to an Authwave provider.