From 48994d8bfd0622481f89e144bc72731e8a30a8ea Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 22 Dec 2024 00:34:35 +0300 Subject: [PATCH] claims --- services/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/auth.py b/services/auth.py index 00af99bb..5f4f6eb7 100644 --- a/services/auth.py +++ b/services/auth.py @@ -29,7 +29,7 @@ async def check_auth(req): host = req.headers.get('host', '') logger.debug(f"check_auth: host={host}") auth_url = AUTH_URL - if 'testing.dscrs.site' in host or 'localhost' in host: + if '.dscrs.site' in host or 'localhost' in host: auth_url = "https://auth.dscrs.site/graphql" user_id = "" user_roles = [] @@ -38,7 +38,7 @@ async def check_auth(req): logger.debug(f"{token}") query_name = "validate_jwt_token" operation = "ValidateToken" - variables = {"params": {"token_type": "access_token", "token": "Bearer " + token}} + variables = {"params": {"token_type": "access_token", "token": token}} gql = { "query": f"query {operation}($params: ValidateJWTTokenInput!)"