Add authentication features for admin access
- Introduce a new `auth` module with login, logout, and user verification endpoints for a single admin user. - Update backend routes to require admin authentication for sensitive operations, enhancing security. - Modify frontend components to include an authentication provider and gate, ensuring only authorized users can access the application. - Implement a login page for admin access, improving user experience and security management. - Update API request handling to redirect unauthorized users to the login page, ensuring proper access control.
This commit is contained in:
@@ -22,6 +22,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from routes import (
|
||||
assistants,
|
||||
auth,
|
||||
health,
|
||||
knowledge_bases,
|
||||
model_registry,
|
||||
@@ -48,6 +49,7 @@ app.add_middleware(
|
||||
)
|
||||
|
||||
app.include_router(health.router)
|
||||
app.include_router(auth.router)
|
||||
app.include_router(assistants.router)
|
||||
app.include_router(knowledge_bases.router)
|
||||
app.include_router(model_registry.router)
|
||||
|
||||
Reference in New Issue
Block a user