Updates the user registration and new account creation endpoints to require email confirmation. - Sets the 'confirmed' flag to 'false' by default for all new user accounts. - Generates a unique confirmation token for each new user. - Logs the confirmation link to the console for development purposes. This change ensures that users cannot log in without first verifying their email address, enhancing account security.
16 lines
589 B
Python
16 lines
589 B
Python
from fastapi import APIRouter
|
|
from .login import router as login_router
|
|
from .register import router as register_router
|
|
from .new import router as new_router
|
|
from .current_user import router as current_user_router, oauth2_scheme
|
|
from .lost_password import router as lost_password_router
|
|
from .confirm import router as confirm_router
|
|
|
|
router = APIRouter()
|
|
router.include_router(login_router)
|
|
router.include_router(register_router)
|
|
router.include_router(new_router)
|
|
router.include_router(current_user_router)
|
|
router.include_router(lost_password_router)
|
|
router.include_router(confirm_router)
|