Skip to content

Commit

Permalink
update constant
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Feb 4, 2025
1 parent ca76bf7 commit e25ed06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/onyx/auth/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
from onyx.configs.constants import AuthType
from onyx.configs.constants import DANSWER_API_KEY_DUMMY_EMAIL_DOMAIN
from onyx.configs.constants import DANSWER_API_KEY_PREFIX
from onyx.configs.constants import FASTAPI_USERS_AUTH_COOKIE_NAME
from onyx.configs.constants import MilestoneRecordType
from onyx.configs.constants import OnyxRedisLocks
from onyx.configs.constants import PASSWORD_SPECIAL_CHARS
Expand Down Expand Up @@ -597,6 +598,7 @@ async def get_user_manager(
cookie_transport = CookieTransport(
cookie_max_age=SESSION_EXPIRE_TIME_SECONDS,
cookie_secure=WEB_DOMAIN.startswith("https"),
cookie_name=FASTAPI_USERS_AUTH_COOKIE_NAME,
)


Expand Down
4 changes: 3 additions & 1 deletion backend/onyx/configs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
SESSION_KEY = "session"

# Cookies
FASTAPI_USERS_AUTH_COOKIE_NAME = "fastapiusersauth"
FASTAPI_USERS_AUTH_COOKIE_NAME = (
"fastapiusersauth" # Currently a constant, but logic allows for configuration
)
TENANT_ID_COOKIE_NAME = "onyx_tid" # tenant id - for workaround cases

NO_AUTH_USER_ID = "__no_auth_user__"
Expand Down

0 comments on commit e25ed06

Please sign in to comment.