mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-12 22:23:01 +02:00
Initial login flow
This commit is contained in:
@ -13,6 +13,16 @@ APP_PORT = 8080
|
||||
BLURB_LENGTH = 200 # Characters. Blurbs will be truncated at the first punctuation after this many characters.
|
||||
|
||||
|
||||
#####
|
||||
# Web Configs
|
||||
#####
|
||||
# WEB_DOMAIN is used to set the redirect_uri when doing OAuth with Google
|
||||
# TODO: investigate if this can be done cleaner by overwriting the redirect_uri
|
||||
# on the frontend and just sending a dummy value (or completely generating the URL)
|
||||
# on the frontend
|
||||
WEB_DOMAIN = os.environ.get("WEB_DOMAIN", "http://localhost:3000")
|
||||
|
||||
|
||||
#####
|
||||
# Vector DB Configs
|
||||
#####
|
||||
|
@ -9,6 +9,7 @@ from danswer.auth.users import fastapi_users
|
||||
from danswer.auth.users import google_oauth_client
|
||||
from danswer.configs.app_configs import APP_HOST
|
||||
from danswer.configs.app_configs import APP_PORT
|
||||
from danswer.configs.app_configs import WEB_DOMAIN
|
||||
from danswer.server.admin import router as admin_router
|
||||
from danswer.server.event_loading import router as event_processing_router
|
||||
from danswer.server.search_backend import router as backend_router
|
||||
@ -69,7 +70,9 @@ def get_application() -> FastAPI:
|
||||
SECRET,
|
||||
associate_by_email=True,
|
||||
is_verified_by_default=True,
|
||||
redirect_url="http://localhost:8080/test", # TODO DAN-39 set this to frontend redirect
|
||||
# points the user back to the login page, where we will call the
|
||||
# /auth/google/callback endpoint + redirect them to the main app
|
||||
redirect_url=f"{WEB_DOMAIN}/auth/google/callback",
|
||||
),
|
||||
prefix="/auth/google",
|
||||
tags=["auth"],
|
||||
|
@ -1,7 +1,6 @@
|
||||
from datetime import datetime
|
||||
|
||||
from danswer.configs.constants import DocumentSource
|
||||
from danswer.connectors.models import ConnectorDescriptor
|
||||
from danswer.connectors.models import InputType
|
||||
from danswer.connectors.slack.config import get_slack_config
|
||||
from danswer.connectors.slack.config import SlackConfig
|
||||
|
Reference in New Issue
Block a user