diff --git a/apiserver/plane/api/views/authentication.py b/apiserver/plane/api/views/authentication.py index 0d37b1c33..aa8ff4511 100644 --- a/apiserver/plane/api/views/authentication.py +++ b/apiserver/plane/api/views/authentication.py @@ -279,6 +279,8 @@ class MagicSignInGenerateEndpoint(BaseAPIView): status=status.HTTP_400_BAD_REQUEST, ) + # Clean up + email = email.strip().lower() validate_email(email) ## Generate a random token @@ -346,7 +348,7 @@ class MagicSignInEndpoint(BaseAPIView): def post(self, request): try: user_token = request.data.get("token", "").strip() - key = request.data.get("key", False) + key = request.data.get("key", False).strip().lower() if not key or user_token == "": return Response(