Setup & Configuration
Complete setup guide for integrating AuthSafe authentication in Express.js applications.
Overview
Covers installation of authsafe-express and cookie-parser, environment variable configuration, basic setup with cookie parser and initAuthSafe(), and the full AuthSafeConfig interface including cookie and session options.
Basic Usage
import { initAuthSafe } from 'authsafe-express';
initAuthSafe({
clientId: process.env.AUTHSAFE_CLIENT_ID,
clientSecret: process.env.AUTHSAFE_CLIENT_SECRET,
domain: process.env.AUTHSAFE_DOMAIN,
redirectUri: process.env.APP_URL + '/auth/callback',
});