mirror of
https://github.com/DarrylNixon/ghostforge
synced 2024-04-22 06:27:20 -07:00
back to SQLmodel...
This commit is contained in:
parent
6f81ef699d
commit
47931af84f
9 changed files with 158 additions and 26 deletions
|
@ -13,11 +13,12 @@ from fastapi_users.authentication import AuthenticationBackend
|
|||
from fastapi_users.authentication import BearerTransport
|
||||
from fastapi_users.authentication import CookieTransport
|
||||
from fastapi_users.authentication import JWTStrategy
|
||||
from fastapi_users.db import SQLAlchemyUserDatabase
|
||||
from fastapi_users_db_sqlmodel import SQLModelUserDatabase
|
||||
|
||||
from ghostforge.db import get_user_db
|
||||
from ghostforge.db import User
|
||||
|
||||
|
||||
SECRET = os.environ.get("GHOSTFORGE_JWT_SECRET")
|
||||
|
||||
gf = APIRouter()
|
||||
|
@ -49,7 +50,7 @@ class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
|
|||
print(f"Verification requested for user {user.id}. Verification token: {token}")
|
||||
|
||||
|
||||
async def get_user_manager(user_db: SQLAlchemyUserDatabase = Depends(get_user_db)):
|
||||
async def get_user_manager(user_db: SQLModelUserDatabase = Depends(get_user_db)):
|
||||
yield UserManager(user_db)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue