mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
feat(auth): refactor
This commit is contained in:
@@ -5,7 +5,7 @@ import app.services.user_service
|
|||||||
from app.models.user import User
|
from app.models.user import User
|
||||||
|
|
||||||
from app.schemas.user import UserCreate, UserRead, UserUpdate
|
from app.schemas.user import UserCreate, UserRead, UserUpdate
|
||||||
from app.services.user_service import auth_backend, current_active_verified_user, fastapi_users
|
from app.services.user_service import auth_backend, current_active_verified_user, fastapi_users, get_oauth_provider
|
||||||
|
|
||||||
fastApi = FastAPI()
|
fastApi = FastAPI()
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ fastApi.include_router(
|
|||||||
|
|
||||||
fastApi.include_router(
|
fastApi.include_router(
|
||||||
fastapi_users.get_oauth_router(
|
fastapi_users.get_oauth_router(
|
||||||
app.services.user_service.get_oauth_provider("MojeID"),
|
get_oauth_provider("MojeID"),
|
||||||
auth_backend,
|
auth_backend,
|
||||||
"SECRET",
|
"SECRET",
|
||||||
associate_by_email=True,
|
associate_by_email=True,
|
||||||
@@ -58,7 +58,7 @@ fastApi.include_router(
|
|||||||
|
|
||||||
fastApi.include_router(
|
fastApi.include_router(
|
||||||
fastapi_users.get_oauth_router(
|
fastapi_users.get_oauth_router(
|
||||||
app.services.user_service.get_oauth_provider("BankID"),
|
get_oauth_provider("BankID"),
|
||||||
auth_backend,
|
auth_backend,
|
||||||
"SECRET",
|
"SECRET",
|
||||||
associate_by_email=True,
|
associate_by_email=True,
|
||||||
|
|||||||
Reference in New Issue
Block a user