Now revoked tokens are saved to database

This commit is contained in:
Marcin-Ramotowski
2025-03-29 17:48:55 +00:00
parent 5d45fcf932
commit 7f36f67df4
3 changed files with 10 additions and 6 deletions

View File

@ -1,7 +1,6 @@
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
revoked_tokens = set()
class User(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
@ -37,3 +36,6 @@ class Task(db.Model):
@staticmethod
def get_editable_fields():
return {"title", "description", "due_date", "done"}
class RevokedToken(db.Model):
jti = db.Column(db.String(100), primary_key=True)