feat(auth): add /v3/action/auth/authenticate_passcode endpoint

Moves passcode→JWT auth into the V3 action namespace. The new router
(api_v3_actions_auth.py) is a clean re-registration of the existing
working logic. The legacy /api/authenticate_passcode is kept but marked
deprecated via DeprecationParams while the frontend transitions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-18 15:48:48 -04:00
parent 0bb65efb7c
commit 50b1e00903
3 changed files with 100 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ class PasscodeAuthRequest(BaseModel):
site_id: str = Field(..., description="The random string ID of the site")
passcode: str = Field(..., min_length=5, description="The passcode to verify")
@router.post('/authenticate_passcode', response_model=Resp_Body_Base)
@router.post('/authenticate_passcode', response_model=Resp_Body_Base, dependencies=[Depends(DeprecationParams)])
async def authenticate_passcode(
auth_req: PasscodeAuthRequest,
response: Response = Response,