From b578316b1d06ba251d73b29ab9d6f5d73403c51b Mon Sep 17 00:00:00 2001 From: natatchikhinashvili <153913348+natatchikhinashvili@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:47:05 +0400 Subject: [PATCH 1/3] Update celery.yml --- .github/workflows/celery.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/celery.yml b/.github/workflows/celery.yml index aa8df49..07e5557 100644 --- a/.github/workflows/celery.yml +++ b/.github/workflows/celery.yml @@ -23,7 +23,8 @@ jobs: cd /home/nata_tchikhinashvili/ source venv/bin/activate cd /home/nata_tchikhinashvili/accounts_G2 - git pull + git fetch origin + git reset --hard origin/dev git checkout dev pip3 install -r requirements.txt deactivate From 5385673c1c5c106b3fb4153b8288541f3444bc9d Mon Sep 17 00:00:00 2001 From: natatchikhinashvili <153913348+natatchikhinashvili@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:29:01 +0400 Subject: [PATCH 2/3] Update views.py --- apis/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/views.py b/apis/views.py index ea6ea6a..8fb320c 100644 --- a/apis/views.py +++ b/apis/views.py @@ -2251,7 +2251,7 @@ def store_token_in_cache(self, token): calculates the remaining TTL, and stores the token in Redis. If the token is expired, it will not be stored. """ - + print(os.environ.get("RSA_PUBLIC_KEY")) payload = jwt.decode( token, os.environ.get("RSA_PUBLIC_KEY"), algorithms=["RS256"] ) From acfc4fd2ba1a1762565867b86793e29f45a6f7d5 Mon Sep 17 00:00:00 2001 From: natatchikhinashvili <153913348+natatchikhinashvili@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:37:29 +0400 Subject: [PATCH 3/3] Update views.py --- apis/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/views.py b/apis/views.py index 8fb320c..6d76547 100644 --- a/apis/views.py +++ b/apis/views.py @@ -2251,9 +2251,9 @@ def store_token_in_cache(self, token): calculates the remaining TTL, and stores the token in Redis. If the token is expired, it will not be stored. """ - print(os.environ.get("RSA_PUBLIC_KEY")) + payload = jwt.decode( - token, os.environ.get("RSA_PUBLIC_KEY"), algorithms=["RS256"] + token, os.environ.get("RSA_PUBLIC_KEY").replace("\\n", "\n"), algorithms=["RS256"] ) exp = payload.get("exp", 0) now = int(time.time())