ai-cfia / membrane-backend

Membrane Backend: A centralized authentication service for Single Sign-On (SSO) enabling seamless token-based email verification across multiple client applications.
MIT License
1 stars 0 forks source link

Refactor Configuration Logic in app.py and Ensure Key Directory Validatio #11

Closed CFIALeronB closed 1 year ago

CFIALeronB commented 1 year ago

Description: The current configuration logic in app.py appears a bit scattered and lacks an explicit check for the existence of the keys directory. This could lead to potential runtime issues if the directory is missing or misconfigured. It is imperative to improve the readability of the code and ensure robustness by adding necessary validations.

Tasks:

  1. Group related configurations and separate them with comments for better clarity.
  2. Move Flask app initialization to the top.
  3. Group JWT-related configurations.
  4. Implement and validate the existence of the specified (or default) keys directory.
  5. Group Flask-Session configurations.
  6. Ensure error handlers are registered at the end.