✔ Minor additions to docs

This commit is contained in:
thec0sm0s
2020-09-11 10:08:18 +05:30
parent f749741647
commit da5a609682
2 changed files with 5 additions and 0 deletions

View File

@@ -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.

View File

@@ -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.