RegisterLogin
DocsPricing
RegisterLogin
  • Getting Started
  • Introduction
  • Quick Start
  • SDKs
  • React
  • TypeScript
  • Next.js
  • Express
  • NestJS
  • Python
  • API Reference
  • Support and Resources
  • FAQ
  • Contact

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',
});

Best Practices
  • Cookie parser must be applied before AuthSafe middleware
  • Call initAuthSafe() once during app initialization
  • Never commit your .env file to version control

AuthSafe

Product

HighlightFeatureIntegrationPricingFAQ

Company

AboutBlogContact

Developer

DashboardDocumentation

Legal

Terms & ConditionsPrivacyComplianceShippingCancellationAI

© 2026 AuthSafe. All rights reserved.

We value your privacy

This website uses cookies for anonymous analytics to help us improve your experience. No personal information is stored or shared. You can allow or reject analytics tracking at any time. See our Privacy Policy.

We use cookies for anonymous analytics. No personal info is stored. See our Privacy Policy.