Skip to content

v1.0.8 (Optional Registration)

Compare
Choose a tag to compare
@jaypyles jaypyles released this 11 May 16:12
· 69 commits to master since this release
8703f70

Summary

Introduces functionality to conditionally disable user registration based on the REGISTRATION_ENABLED environment variable. When registration is disabled, a default user is automatically created if credentials are provided.

🔐 Registration Check API

  • Added /auth/check endpoint to expose REGISTRATION_ENABLED value to the frontend.

🛠️ Startup Logic

  • On startup, the backend checks for required default user credentials:
    • DEFAULT_USER_EMAIL
    • DEFAULT_USER_PASSWORD
    • DEFAULT_USER_FULL_NAME
  • If registration is disabled and any of these are missing, the app will log an error and exit.

✅ Frontend Integration

  • Merged AI and auth check responses into a single /api/check endpoint.
  • Updated login form UI to reflect the registration status:
    • Hides the "Sign up" button when registration is disabled.
    • Displays a message indicating that registration is not available.

🧹 Minor Fixes

  • Improved response format for AI availability check:
    GET /api/ai/check now returns { ai_enabled: true/false }.
  • Moved and renamed API route for better organization and frontend access.