oauth via github

This commit is contained in:
knst-kotov
2021-07-09 07:14:16 +00:00
parent e6b0866f6e
commit 571dad6f60
6 changed files with 76 additions and 31 deletions

View File

@@ -11,9 +11,11 @@ class User(Base):
email: str = Column(String, nullable=False)
username: str = Column(String, nullable=False, comment="Name")
password: str = Column(String, nullable=False, comment="Password")
password: str = Column(String, nullable=True, comment="Password")
role_id: int = Column(ForeignKey("role.id"), nullable=True, comment="Role")
oauth_id: str = Column(String, nullable=True)
@classmethod
def get_permission(cls, user_id):