From 83a052539bbd80876e9af91548a065dc95d92922 Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Mon, 5 May 2025 08:38:05 +0330 Subject: [PATCH] return cache_key in jwt --- apps/authentication/api/v1/serializers/jwt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/api/v1/serializers/jwt.py b/apps/authentication/api/v1/serializers/jwt.py index 4bff9f5..ad663ab 100644 --- a/apps/authentication/api/v1/serializers/jwt.py +++ b/apps/authentication/api/v1/serializers/jwt.py @@ -20,7 +20,7 @@ class CustomizedTokenObtainPairSerializer(TokenObtainPairSerializer): # noqa captcha_code = self.context['request'].data['captcha_code'] captcha_key = self.context['request'].data['captcha_key'] - + return {"cache_key": cache.get(captcha_key)} if captcha_code != cache.get(captcha_key) or captcha_code not in self.context['request'].data.keys(): raise captcha_exception.CaptchaFailed()