Updated 18 November 2026
Preflight Checklist for Installing Own Auth into an Existing Postgres Application
Why a Preflight Checklist Matters
Installing Own Auth into an existing Postgres application is straightforward, but preparation prevents migration headaches. This checklist walks you through the essential checks to ensure a smooth integration. Own Auth runs inside your application backend and stores all authentication data in your existing Postgres database, so alignment between your current setup and Own Auth requirements is critical.
Database Prerequisites
Before installing the Own Auth package, verify your Postgres environment meets the minimum requirements. Own Auth relies on specific Postgres features for secure token and session storage.
- PostgreSQL version 13 or higher is required for optimal compatibility
- Confirm your application has database superuser privileges or owner level access for schema creation
- Verify the database user has permission to create new tables and indexes
- Ensure adequate database connection pool capacity for authentication operations
- Check that your database has sufficient storage for new tables and indexes
Current Authentication Audit
Understanding your existing authentication system helps you plan the migration and identify potential conflicts.
- Document all current user tables, including columns, indexes, and relationships
- Document the password, passwordless, OAuth, and MFA methods currently exposed to users
- List current session management approaches and storage mechanisms
- Map existing API key or token implementations
- Review current email delivery methods for password resets and verifications
Own Auth hashes new passwords with Argon2id. It stores authentication tokens, session tokens, SMS codes, invitation tokens, and application API keys as hashes.
Package Installation Readiness
Prepare your application environment before adding the Own Auth package. Framework compatibility is an important consideration.
- Verify your Node.js version meets the Own Auth package requirements
- Check that your package manager (npm, yarn, or pnpm) is up to date
- Review framework specific guides for Next.js, Express, Hono, or Fastify
- Ensure your application has TypeScript configured if using TypeScript based integration
- Backup your package.json and lock file before making changes
npm install own-authDatabase Migration Planning
Own Auth creates its own tables within your existing database schema. Planning the migration prevents data conflicts and ensures clean separation between your application data and authentication data.
- Decide on a schema namespace: use the default 'auth' schema or a custom one
- Plan table names: users, sessions, tokens,
api_keys, organisations, invitations,audit_events, andrate_limits - Determine if you need to run migrations during deployment or as part of your CI pipeline
- Consider running migrations in a transaction for atomic deployment
- Test migrations on a staging database before production deployment
Email Delivery Configuration
Own Auth generates authentication URLs and one time tokens but does not send messages. Configure an email sender in your application before enabling email verification, password resets, or magic links.
Email Sender Setup
If you prefer to send authentication emails through your own infrastructure, ensure your email service is properly configured.
- Verify your SMTP server credentials and connection settings
- Test email deliverability from your production environment
- Ensure your sending domain has proper SPF, DKIM, and DMARC records
- Configure retry logic for temporary delivery failures
- Set up monitoring for bounce rates and delivery failures
Environment Variables and Configuration
Own Auth requires specific environment variables for secure operation. Prepare these before installation.
# Required: Database connection string
DATABASE_URL=postgresql://user:password@host:5432/mydb
# Required: Session and token secrets
OWN_AUTH_SECRET=your-secure-random-secret-at-least-32-chars
# Optional: Application URL for generating links
APP_URL=https://yourapp.com- Generate a cryptographically secure secret for session encryption
- Configure the application URL that Own Auth uses for generating magic links
- Set appropriate token expiration times for your security requirements
- Choose between UTC or local timezone for audit log timestamps
- Configure rate limiting thresholds for sensitive operations
Security Considerations
Authentication security requires careful attention to several factors before and after installation.
- Ensure your database has proper access controls and network isolation
- Review rate limiting configuration for brute force protection
- Plan audit log retention based on your compliance requirements
- Configure session absolute and idle expiry times appropriately
- Set up API key rotation policies for application API keys
Own Auth stores all authentication data in your application's Postgres database, giving you complete control over your authentication data. No data leaves your infrastructure except for optional email delivery.
Testing the Integration
Thorough testing validates that authentication works correctly before exposing it to users.
- Test password signup and signin with various password strengths
- Verify magic link generation and delivery
- Test email verification and password reset flows
- Confirm session creation, persistence, and revocation
- Validate API key creation, scoping, and revocation
- Test organisation creation, member invitations, and role management
- Verify rate limiting triggers and behavior
- Test audit log entries for all authentication operations
Deployment Checklist
Before going live with Own Auth in production, verify these final items.
- Run all migrations on production database with verified backups
- Confirm environment variables are set correctly in production
- Test the complete authentication flow in production environment
- Monitor initial authentication traffic for any issues
- Verify error logging and monitoring for authentication operations
- Set up alerts for failed authentication attempts and rate limit triggers
- Document any custom configuration for team reference
Next Steps
With this checklist complete, you are ready to install Own Auth and migrate your authentication. Start with the official documentation at /docs/installation.
- Install the Own Auth package from npm
- Run initial database migrations
- Configure your environment variables
- Test authentication flows in staging
- Deploy to production and monitor