MCPcopy
hub / github.com/AgentOps-AI/agentops / auth_password_reset

Function auth_password_reset

app/api/agentops/auth/views.py:525–541  ·  view source on GitHub ↗

Initiates a password reset flow by sending a reset email to the user.

(request: Request, body: PasswordResetSchema)

Source from the content-addressed store, hash-verified

523
524@public_route
525async def auth_password_reset(request: Request, body: PasswordResetSchema) -> StatusResponse:
526 """
527 Initiates a password reset flow by sending a reset email to the user.
528 """
529 supabase = get_supabase()
530
531 try:
532 # Use the frontend callback URL, same as the invite flow
533 redirect_url = f"{APP_URL}/auth/callback"
534 auth_response = supabase.auth.reset_password_for_email(body.email, {"redirect_to": redirect_url})
535 except gotrue.errors.AuthApiError as e:
536 raise AuthException.from_gotrue_autherror(e)
537
538 if hasattr(auth_response, 'error'):
539 raise AuthException("Failed to send password reset email.")
540
541 return StatusResponse(message="Password reset email sent successfully.")
542
543
544async def auth_logout(request: Request) -> StatusResponse:

Callers

nothing calls this directly

Calls 4

get_supabaseFunction · 0.90
AuthExceptionClass · 0.85
from_gotrue_autherrorMethod · 0.80
StatusResponseClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…