fixed an issue with callbacks
All checks were successful
Docker Build / Build (push) Successful in 26s
Linter / Lint (3.11) (push) Successful in 40s

This commit is contained in:
Seaswimmer 2023-11-25 17:47:22 -05:00
parent aa795319c5
commit 6151e613f9
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -1,5 +1,5 @@
import os import os
from flask import Flask, render_template, redirect, url_for from flask import Flask, render_template, redirect, request, url_for
from flask_discord import DiscordOAuth2Session, requires_authorization, AccessDenied, Unauthorized from flask_discord import DiscordOAuth2Session, requires_authorization, AccessDenied, Unauthorized
from config import load_config from config import load_config
@ -31,6 +31,7 @@ def me():
@app.route("/login/") @app.route("/login/")
def login(): def login():
discord.redirect_uri = request.host + "/callback/"
return discord.create_session(scope=['identify', 'guilds', 'guilds.members.read']) return discord.create_session(scope=['identify', 'guilds', 'guilds.members.read'])
@app.route("/logout/") @app.route("/logout/")