aboutsummaryrefslogtreecommitdiff
path: root/app/blueprints/github/__init__.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-01-30 21:39:51 +0000
committerrubenwardy <rw@rubenwardy.com>2020-01-30 21:39:51 +0000
commit744c52ba1821506f14fa0226afc8975b04cf76d5 (patch)
tree1b563db0c6ede72f7db3682047a9484dbd8cc492 /app/blueprints/github/__init__.py
parentc31c1fd92a7de702a3fe517489d95dbc92643f5b (diff)
downloadcheatdb-744c52ba1821506f14fa0226afc8975b04cf76d5.tar.xz
Add links to GitHub oauth connection settingsv1.23.5
Diffstat (limited to 'app/blueprints/github/__init__.py')
-rw-r--r--app/blueprints/github/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py
index 1d160a2..7477238 100644
--- a/app/blueprints/github/__init__.py
+++ b/app/blueprints/github/__init__.py
@@ -18,7 +18,7 @@ from flask import Blueprint
bp = Blueprint("github", __name__)
-from flask import redirect, url_for, request, flash, abort, render_template, jsonify
+from flask import redirect, url_for, request, flash, abort, render_template, jsonify, current_app
from flask_user import current_user, login_required
from sqlalchemy import func
from flask_github import GitHub
@@ -35,6 +35,12 @@ from wtforms import SelectField, SubmitField
def start():
return github.authorize("", redirect_uri=abs_url_for("github.callback"))
+@bp.route("/github/view/")
+def view_permissions():
+ url = "https://github.com/settings/connections/applications/" + \
+ current_app.config["GITHUB_CLIENT_ID"]
+ return redirect(url)
+
@bp.route("/github/callback/")
@github.authorized_handler
def callback(oauth_token):