Page cover

Development Authentication

When developing your Allinix application locally, you can use a simplified authentication system. This streamlines testing and debugging but should never be used in production environments.

⚠️ Warning: The development authentication mode is not secure and should only be used for local testing.

To configure authentication:

  1. Set NODE_ENV="development" in your .env file to enable development mode

  2. Set NEXTAUTH_SECRET to any value (e.g., "development-secret") for local testing

OAuth Provider Setup

Google Authentication Setup

  1. Create a new project

  2. Go to "Credentials" → "Create Credentials" → "OAuth client ID"

  3. Set up the OAuth consent screen

  4. Copy the generated client ID and secret

  5. Add to .env:

GOOGLE_CLIENT_ID="your_client_id"
GOOGLE_CLIENT_SECRET="your_client_secret"

For detailed setup instructions, visit Google's OAuth 2.0 setup guidearrow-up-right.

GitHub Authentication Setup

  1. Open GitHub Settingsarrow-up-right → Developer Settings

  2. Select "OAuth Apps" → "New OAuth App"

  3. Configure your application settings

  4. Copy the client ID and generated secret

  5. Add to .env:

For detailed setup instructions, visit GitHub's OAuth Apps documentationarrow-up-right.

Discord Authentication Setup

  1. Create a new application

  2. Configure OAuth2 settings and add redirect URIs

  3. Copy the application ID and secret

  4. Add to .env:

For detailed setup instructions, visit the Discord OAuth2 documentationarrow-up-right.

Production Configuration

When deploying to production, follow these essential steps:

ℹ️ Note: Ensure all credentials and secrets are properly secured and never committed to version control.

  1. Generate a strong, random value for NEXTAUTH_SECRET

  2. Set NEXTAUTH_URL to your production domain (cannot be localhost)

  3. Ensure all OAuth provider credentials are properly configured

  4. Set NODE_ENV="production"

Example production .env configuration:

⚠️ Warning: Never commit your .env file to version control. Use environment variables in your deployment platform to manage sensitive credentials.

Last updated