WIP checkpoint: Upgrade auth to RS256 signing, age-verification field, refresh-token sessions
This commit is contained in:
@@ -26,7 +26,9 @@ class RefreshToken(Base):
|
||||
|
||||
id = Column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||
user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE"), nullable=False)
|
||||
token = Column(String(512), unique=True, index=True, nullable=False)
|
||||
# RS256 JWTs are ~420+ chars; Text avoids length issues and is fine for
|
||||
# a UUID-indexed lookup by hash in the future.
|
||||
token = Column(String, unique=True, index=True, nullable=False)
|
||||
expires_at = Column(DateTime(timezone=True), nullable=False)
|
||||
is_active = Column(Boolean, default=True)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
Reference in New Issue
Block a user