Skip to content
Greg Bowler edited this page Nov 1, 2026 · 2 revisions

@authwave/typescript-client connects a JavaScript or TypeScript application to an Authwave provider, so visitors can sign in without us building authentication screens ourselves.

Imagine we are adding a members' area to a website. The client sends the browser to the provider, reads the encrypted response on return, and remembers the user in the application's server-side session.

Authwave is open source and can be self-hosted. The client uses login.authwave.com by default, or we can point it at our own provider.

A small example

if (auth.isLoggedIn()) {
  const user = auth.getAuthUser();
  console.log('Welcome back,', user.email);
} else {
  auth.login();
}

The Quick start guide shows the complete setup, including installation, the client key and the session.

What this library covers

  • Starting provider login and handling its encrypted return request.
  • Restoring an authenticated user from a server-side session.
  • Reading user ID and email.
  • Calling application code when authentication completes.
  • Building provider URIs and accepting custom session and redirect handlers.
  • Node.js HTTP handlers, Express handlers and Next.js App Router Route Handlers.

Our application still decides which resources the user can access.


Start with Overview, or follow the Quick start guide.

Clone this wiki locally