diff --git a/website/routes.py b/website/routes.py index 51f188b..187c529 100644 --- a/website/routes.py +++ b/website/routes.py @@ -523,7 +523,14 @@ def authUser(): def issue_token(): try: resp = authorization.create_token_response() - print(resp.text,flush=True) + if hasattr(resp, 'json'): + print(resp.json(), flush=True) + elif hasattr(resp, 'content'): + print(resp.content, flush=True) + elif hasattr(resp, 'data'): + print(resp.data, flush=True) + else: + print("Unknown response structure:", resp) return resp except OAuth2Error as error: print(json.dumps({