mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2025-12-09 20:09:30 +02:00
✔ Minor additions to docs
This commit is contained in:
@@ -13,12 +13,15 @@ python3 -m pip install Flask-Discord
|
|||||||
|
|
||||||
### Basic Example
|
### Basic Example
|
||||||
```python
|
```python
|
||||||
|
import os
|
||||||
|
|
||||||
from flask import Flask, redirect, url_for
|
from flask import Flask, redirect, url_for
|
||||||
from flask_discord import DiscordOAuth2Session, requires_authorization, Unauthorized
|
from flask_discord import DiscordOAuth2Session, requires_authorization, Unauthorized
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
app.secret_key = b"random bytes representing flask secret key"
|
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_ID"] = 490732332240863233 # Discord client ID.
|
||||||
app.config["DISCORD_CLIENT_SECRET"] = "" # Discord client secret.
|
app.config["DISCORD_CLIENT_SECRET"] = "" # Discord client secret.
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ in exchange for fetching user's details and display them on web page.
|
|||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
app.secret_key = b"random bytes representing flask secret key"
|
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_ID"] = 490732332240863233 # Discord client ID.
|
||||||
app.config["DISCORD_CLIENT_SECRET"] = "" # Discord client secret.
|
app.config["DISCORD_CLIENT_SECRET"] = "" # Discord client secret.
|
||||||
|
|||||||
Reference in New Issue
Block a user