From 82d52ec0ae8958c76f164b5d2e40afa948ddd9f5 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 11 Aug 2019 00:28:19 +0200 Subject: [PATCH] enable CORS for /oauth/token --- app/oauth/views/token.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/oauth/views/token.py b/app/oauth/views/token.py index 3200ac83..66a4b8cf 100644 --- a/app/oauth/views/token.py +++ b/app/oauth/views/token.py @@ -1,4 +1,5 @@ from flask import request, jsonify +from flask_cors import cross_origin from app.extensions import db from app.jose_utils import make_id_token @@ -10,6 +11,7 @@ from app.oauth_models import Scope @oauth_bp.route("/token", methods=["POST"]) +@cross_origin() def token(): """ Calls by client to exchange the access token given the authorization code.