-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Code of Conduct
- I agree to follow Django's Code of Conduct
Feature Description
A built in way for Django to generate and validate one time tokens.
Problem
Many web apps use single-use codes for:
- Passwordless login
- Email/phone verification
- 2FA
Despite being a common requirement, Django currently lacks a built-in, standardized mechanism for generating and validating one-time passwords (OTPs).
Request or proposal
proposal
Additional Details
No response
Implementation Suggestions
Proposed APIs (obviously I'm still open to suggestions):
from django.auth import otp
token = otp.create(key, ttl, length, allowed_chars)
# Passing in `delete=True` would invalidate the token after successful validation
otp.authenticate(key, token, invalidate=False)
danielnieto, jaeyongjaykim, smark-1, tim-schilling, ldng and 7 moretacitus and hartungstenio
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Idea refinement - Team creation - For approval