Repository navigation
Home
@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.
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.
- 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.
Authwave’s TypeScript client connects your Node.js, Express or Next.js application to an Authwave provider.