Python, Django, Django Rest Framework, Backend, Programming.
**kwargs): otp = request.data['otp'] print(otp) user = User.objects.get(otp=otp) if user: login(request, user) user.otp = None user.otp_expiry = None user.max_otp_try = 3 user.otp_max_out = None user.save() refresh = RefreshToken.for_user(user) return Response({'access': str(refresh.access_token)},