feat: Delete User from Auth0 on invite delete (#38)

This commit is contained in:
vikynoah
2025-03-06 15:35:42 +01:00
committed by GitHub
parent be260b0ee6
commit b73c524e8d

View File

@@ -119,6 +119,14 @@ def create_user_invite(email: str, company_id: str) -> dict:
raise HTTPException(re.status_code, re.json()) raise HTTPException(re.status_code, re.json())
return re.json() return re.json()
def delete_user_invite(user_id: str) -> None:
re = requests.delete(
f"https://{AUTH0_DOMAIN}/api/v2/users/{user_id}",
headers={"Authorization": f"Bearer {get_management_token()}"},
timeout=5,
)
if re.status_code != 204:
raise HTTPException(re.status_code, re.json())
def password_change_mail(email: str) -> bool: def password_change_mail(email: str) -> bool:
re = requests.post( re = requests.post(