-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secret doesn't end up in JWT #66
Comments
Check if this helps #56 (comment) |
I feel fairly confident that I have done this part correctly, but anything is possible when I take on a project. Here's what I have: In On my Discord Developer Dashboard: What appears in the addressbar after I click "Authorize": My @app.route("/callback/")
def callback():
discord.callback() # <--- Error occurs here according to traceback
user = discord.fetch_user()
return redirect('/') Setting my secret key: app.config["SECRET_KEY"] = os.urandom(24) |
Some newfound information. In |
Sounds either of the following or something similar could be happening:
|
Hello @Mister-SOSA - If you still need this to be fixed, you need to change this line. |
Hi, @Mister-SOSA. I'm Dosu, and I'm helping the Flask-Discord team manage their backlog. I'm marking this issue as stale. Issue Summary:
Next Steps:
Thank you for your understanding and contribution! |
Some Contextual Information:
Python v3.10
JWT v.2.6.0
OS: Ubuntu
Firstly, I am constructing a
DiscordOAuth2Session()
like so (I have shuffled up all the values to protect my application):I then specify my callback address and input it into the Discord Developer Panel:
Upon trying to access a
@requires_authorization
location on my site, I am redirected to the Discord OAuth screen, perfect so far. All the information displayed on this screen is correct.As soon as I click "Authorize," I am redirected to what appears to be the correct location on my website, with a Flask traceback indicating some sort of problem with JWT.
The traceback:
It's hard for me to tell exactly what is wrong, as I am not very good at cracking modules open myself, but this is what I was able to find.
app.config["SECRET_KEY"]
tojwt.decode()
print(f'SECRET AS SEEN IN client.py: {current_app.config["SECRET_KEY"]}')
is ran on line 159 ofclient.py
inFlask-Discord
print(jwt)
outputsb''
when ran on line 250 ofapi_jws.py
injwt
I've tried several different types of secrets to no avail, and I am currently torn between this being my own error or not. If someone has more details, please let me know.
The text was updated successfully, but these errors were encountered: