| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dc2e0d5 commit 2b0fb98
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,14 @@ def ds_callback(): | |||
| 34 | 34 | ||
| 35 | 35 | # Save the redirect eg if present | |
| 36 | 36 | redirect_url = session.pop("eg", None) | |
| 37 | - resp = DSClient.get_token("code_grant") | ||
| 37 | + try: | ||
| 38 | + resp = DSClient.get_token("code_grant") | ||
| 39 | + except Exception as err: | ||
| 40 | + if session.get("pkce_failed", False): | ||
| 41 | + raise err | ||
| 42 | + | ||
| 43 | + session["pkce_failed"] = True | ||
| 44 | + return redirect(url_for("ds.ds_login")) | ||
| 38 | 45 | ||
| 39 | 46 | # app.logger.info("Authenticated with DocuSign.") | |
| 40 | 47 | session["ds_access_token"] = resp["access_token"] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,20 @@ | |||
| 1 | - #!flask/bin/python | ||
| 2 | - from app.quick_acg.quick_acg_app import quick_acg_app | ||
| 3 | - from flask_session import Session | ||
| 4 | - import os | ||
| 5 | - | ||
| 6 | - quick_acg_app.config["QUICK_ACG"] = True | ||
| 7 | - | ||
| 8 | - if os.environ.get("DEBUG", False) == "True": | ||
| 9 | - quick_acg_app.config["DEBUG"] = True | ||
| 10 | - quick_acg_app.config['SESSION_TYPE'] = 'filesystem' | ||
| 11 | - sess = Session() | ||
| 12 | - sess.init_app(quick_acg_app) | ||
| 13 | - port = int(os.environ.get("PORT", 3000)) | ||
| 14 | - quick_acg_app.run(host="localhost", port=3000, debug=True) | ||
| 15 | - else: | ||
| 16 | - quick_acg_app.config['SESSION_TYPE'] = 'filesystem' | ||
| 17 | - sess = Session() | ||
| 18 | - sess.init_app(quick_acg_app) | ||
| 19 | - quick_acg_app.run(host="localhost", port=3000, debug=True) | ||
| 1 | + #!flask/bin/python | ||
| 2 | + from app.quick_acg.quick_acg_app import quick_acg_app | ||
| 3 | + from flask_session import Session | ||
| 4 | + import os | ||
| 5 | + | ||
| 6 | + quick_acg_app.config["QUICK_ACG"] = True | ||
| 7 | + os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' | ||
| 8 | + | ||
| 9 | + if os.environ.get("DEBUG", False) == "True": | ||
| 10 | + quick_acg_app.config["DEBUG"] = True | ||
| 11 | + quick_acg_app.config['SESSION_TYPE'] = 'filesystem' | ||
| 12 | + sess = Session() | ||
| 13 | + sess.init_app(quick_acg_app) | ||
| 14 | + port = int(os.environ.get("PORT", 3000)) | ||
| 15 | + quick_acg_app.run(host="localhost", port=3000, debug=True) | ||
| 16 | + else: | ||
| 17 | + quick_acg_app.config['SESSION_TYPE'] = 'filesystem' | ||
| 18 | + sess = Session() | ||
| 19 | + sess.init_app(quick_acg_app) | ||
| 20 | + quick_acg_app.run(host="localhost", port=3000, debug=True) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments