djangoflow / django-df-auth

Opinionated Django REST auth endpoints for JWT authentication and social accounts
MIT License
10 stars 19 forks source link

[Proposal] Use json object to be encoded in base64 for magic link #30

Closed adar2378 closed 1 year ago

adar2378 commented 1 year ago

Currently on FE we decode the base64 magic link code into email and otp fields. But if we are going to use phone number field or other field for magic link let's say then it will not work. One good way to solve it could be that we could encode the json object to base64 for TokenObtainRequest OpenAPI model. Currently encoded data format in base64 string for magic link

email/otp
// example
saiful@apexive.com/590639

Suggesting format

{

"email": "email", // or "phone": "phone"
"otp":"otp"
}

Then I could create the object TokenObtainRequest.fromJson(json) and we could allow user to login via email/phone etc with OTP without much problem.

adar2378 commented 1 year ago

Not needed image