From da5a60968203537bdd46e108fdea03ae3d2d62d6 Mon Sep 17 00:00:00 2001 From: thec0sm0s Date: Fri, 11 Sep 2020 10:08:18 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=20Minor=20additions=20to=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ docs/introduction.rst | 2 ++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 49d2fe2..2e4ca7e 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,15 @@ python3 -m pip install Flask-Discord ### Basic Example ```python +import os + from flask import Flask, redirect, url_for from flask_discord import DiscordOAuth2Session, requires_authorization, Unauthorized app = Flask(__name__) app.secret_key = b"random bytes representing flask secret key" +os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "true" # !! Only in development environment. app.config["DISCORD_CLIENT_ID"] = 490732332240863233 # Discord client ID. app.config["DISCORD_CLIENT_SECRET"] = "" # Discord client secret. diff --git a/docs/introduction.rst b/docs/introduction.rst index 058079b..cf9d09a 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -54,6 +54,8 @@ in exchange for fetching user's details and display them on web page. app = Flask(__name__) app.secret_key = b"random bytes representing flask secret key" + os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "true" # !! Only in development environment. + # OAuth2 must make use of HTTPS in production environment. app.config["DISCORD_CLIENT_ID"] = 490732332240863233 # Discord client ID. app.config["DISCORD_CLIENT_SECRET"] = "" # Discord client secret.