Einrichtung & Konfiguration
Vollständige Einrichtungsanleitung für die Integration der AuthSafe-Authentifizierung in Express.js-Anwendungen.
Überblick
Umfasst die Installation von authsafe-express und cookie-parser, Umgebungsvariablen-Konfiguration, grundlegende Einrichtung mit Cookie-Parser und initAuthSafe() sowie das vollständige AuthSafeConfig-Interface einschließlich Cookie- und Session-Optionen.
Grundlegende Verwendung
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',
});