mod oauth

This commit is contained in:
l.gabrysiak 2025-03-01 18:32:44 +01:00
parent afb9c0a41e
commit fe0bccc9b3
2 changed files with 2 additions and 19 deletions

View File

@ -376,24 +376,6 @@ class SPAStaticFiles(StaticFiles):
else: else:
raise ex raise ex
print(
rf"""
v{VERSION} - building the best open-source AI user interface.
{f"Commit: {WEBUI_BUILD_HASH}" if WEBUI_BUILD_HASH != "dev-build" else ""}
https://github.com/open-webui/open-webui
"""
)
@asynccontextmanager @asynccontextmanager
async def lifespan(app: FastAPI): async def lifespan(app: FastAPI):
start_logger() start_logger()

View File

@ -366,7 +366,8 @@ class OAuthManager:
log.warning("Username claim is missing, using email as name") log.warning("Username claim is missing, using email as name")
name = email name = email
role = self.get_user_role(None, user_data) #role = self.get_user_role(None, user_data)
role = token.get("role", self.get_user_role(None, user_data))
user = Auths.insert_new_auth( user = Auths.insert_new_auth(
email=email, email=email,