Closed mrsrmn closed 3 years ago
Sounds like the OAuth information is not being saved, or is not correctly associated with the user. What token storage are you using? Have you compared your code to some of the same quickstarts, such as https://github.com/singingwolfboy/flask-dance-google-sqla ?
we are using flask session for storage
@michaeldel, you're the maintainer for the Discord provider. Do you have any idea what's going on here?
@singingwolfboy We fixed the issue by using Flask-SqlAlchemy but there is still an another problem. Flask-Dance doesn't add more than 1 entries to the DB. How can we fix this?
This is how the DB looks like all the time. Only 1 entry
@MakufonSkifto It looks like you don't have a user_id
column for your table when you're storing OAuth tokens. Without a user_id
column, you can't associate OAuth tokens with users. Please make sure you've read the documentation for using the SQLAlchemy token storage, as well as the documentation for multi-user setups.
@singingwolfboy Do i need to store the logged in users in an another DB / Table (using an another class)? It looks like I do and I really don't want to do that.
@MakufonSkifto Yes, you do.
At this point, the topic of this issue has changed from "Discord OAuth isn't working" to "I need support with configuring Flask-Dance". I suggest that you review the documentation and the sample projects, such as the https://github.com/singingwolfboy/flask-dance-google-sqla project that I linked you to earlier. If you still have questions, please open a new issue.
When I try to login into my website, it logs in. But when I click an another link that needs my discord login, I need to login again for some reason and its just an infinite loop. How can I fix this?