Flask-Dance SQLAlchemy integration not working Flask-Dance SQLAlchemy integration not working flask flask

Flask-Dance SQLAlchemy integration not working


Did you resolve this? What is the OAuth table name in your database? If it isn't flask_dance_oauth, then it seems to me you are missing the table name for the OAuth table. It should be:

class OAuth(OAuthConsumerMixin, db.Model):    __bind_key__ = 'users'    __tablename__ = 'flask_dance_oauth'    user_id = db.Column(db.String(50), db.ForeignKey(Users.uuid))    user = db.relationship(Users)

Flask Dance expects this table in your database and updates the token for that user in there for reuse, etc.