Skip to content

Commit

Permalink
chore(auth): rename env vars (#4555)
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy authored and RogerHYang committed Sep 21, 2024
1 parent 145b850 commit 87a1d6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"build:relay": "relay-compiler",
"test": "jest --config ./jest.config.js",
"dev": "pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite",
"dev:auth": "export DANGEROUSLY_SET_PHOENIX_ENABLE_AUTH=true && export DANGEROUSLY_SET_PHOENIX_SECRET=sa18f44bd9b6b4b0606e58a2d03d09039aee8283e0074c6517fda58577a07dd#A && pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite",
"dev:auth": "export PHOENIX_ENABLE_AUTH=true && export PHOENIX_SECRET=sa18f44bd9b6b4b0606e58a2d03d09039aee8283e0074c6517fda58577a07dd#A && pnpm run dev:server & pnpm run build:static && pnpm run build:relay && vite",
"dev:ui": "pnpm run build:static && pnpm run build:relay && vite",
"dev:server:init": "python -m phoenix.server.main --dev serve --with-fixture=chatbot --with-project=demo_llama_index --force-fixture-ingestion",
"dev:server": "python -m phoenix.server.main --dev serve",
Expand Down
8 changes: 4 additions & 4 deletions src/phoenix/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@

# Auth is under active development. Phoenix users are strongly advised not to
# set these environment variables until the feature is officially released.
ENV_PHOENIX_ENABLE_AUTH = "DANGEROUSLY_SET_PHOENIX_ENABLE_AUTH"
ENV_PHOENIX_SECRET = "DANGEROUSLY_SET_PHOENIX_SECRET"
ENV_PHOENIX_ENABLE_AUTH = "PHOENIX_ENABLE_AUTH"
ENV_PHOENIX_SECRET = "PHOENIX_SECRET"
ENV_PHOENIX_API_KEY = "PHOENIX_API_KEY"
ENV_PHOENIX_USE_SECURE_COOKIES = "PHOENIX_USE_SECURE_COOKIES"

Expand Down Expand Up @@ -148,14 +148,14 @@ def get_boolean_env_var(env_var: str) -> Optional[bool]:

def get_env_enable_auth() -> bool:
"""
Gets the value of the DANGEROUSLY_SET_PHOENIX_ENABLE_AUTH environment variable.
Gets the value of the PHOENIX_ENABLE_AUTH environment variable.
"""
return get_boolean_env_var(ENV_PHOENIX_ENABLE_AUTH) is True


def get_env_phoenix_secret() -> Optional[str]:
"""
Gets the value of the DANGEROUSLY_SET_PHOENIX_SECRET environment variable
Gets the value of the PHOENIX_SECRET environment variable
and performs validation.
"""
phoenix_secret = os.environ.get(ENV_PHOENIX_SECRET)
Expand Down

0 comments on commit 87a1d6e

Please sign in to comment.