mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-29 05:15:12 +02:00
fix saml email login upsert issue
This commit is contained in:
committed by
Chris Weaver
parent
c8d13922a9
commit
487250320b
@@ -12,7 +12,6 @@ from fastapi_users import exceptions
|
|||||||
from fastapi_users.password import PasswordHelper
|
from fastapi_users.password import PasswordHelper
|
||||||
from onelogin.saml2.auth import OneLogin_Saml2_Auth # type: ignore
|
from onelogin.saml2.auth import OneLogin_Saml2_Auth # type: ignore
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from pydantic import EmailStr
|
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from danswer.auth.schemas import UserCreate
|
from danswer.auth.schemas import UserCreate
|
||||||
@@ -61,7 +60,7 @@ async def upsert_saml_user(email: str) -> User:
|
|||||||
|
|
||||||
user: User = await user_manager.create(
|
user: User = await user_manager.create(
|
||||||
UserCreate(
|
UserCreate(
|
||||||
email=EmailStr(email),
|
email=email,
|
||||||
password=hashed_pass,
|
password=hashed_pass,
|
||||||
is_verified=True,
|
is_verified=True,
|
||||||
role=role,
|
role=role,
|
||||||
|
Reference in New Issue
Block a user