Skip to content

Commit

Permalink
Fix default authentication token
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Jul 31, 2024
1 parent c95e046 commit 956a52e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include hypha/VERSION
include hypha/templates/*
include hypha/built-in/*
include hypha/static_files/*
include hypha/static_files/img/*
include LICENSE
2 changes: 1 addition & 1 deletion docs/setup-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To set up your own account, follow these steps:
- Give your application a name (e.g. hypha), and choose "Single Page Web Applications" as the application type. Then click "Create".
- Now go to the "Settings" tab of your application, and copy the "Domain" and "Client ID" values to create environment variables for running Hypha:
```
AUTH0_CLIENT_ID=hMIMGeUvEHkVmi4KlGDSKfRPuGW43ypc # replace with your own value from the "Settings" tab
AUTH0_CLIENT_ID=paEagfNXPBVw8Ss80U5RAmAV4pjCPsD2 # replace with your own value from the "Settings" tab
AUTH0_DOMAIN=amun-ai.eu.auth0.com # replace with your own value from the "Settings" tab
AUTH0_AUDIENCE=https://amun-ai.eu.auth0.com/api/v2/ # replace 'amun-ai.eu.auth0.com' to your own auth0 domain
AUTH0_ISSUER=https://amun.ai/ # keep it or replace 'amun.ai' to any website you want to use as the issuer
Expand Down
2 changes: 1 addition & 1 deletion hypha/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.20.1b1"
"version": "0.20.1b2"
}
6 changes: 4 additions & 2 deletions hypha/core/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@
load_dotenv(ENV_FILE)

MAXIMUM_LOGIN_TIME = env.get("MAXIMUM_LOGIN_TIME", "180") # 3 minutes
AUTH0_CLIENT_ID = env.get("AUTH0_CLIENT_ID", "ofsvx6A7LdMhG0hklr5JCAEawLv4Pyse")
AUTH0_CLIENT_ID = env.get("AUTH0_CLIENT_ID", "paEagfNXPBVw8Ss80U5RAmAV4pjCPsD2")
AUTH0_DOMAIN = env.get("AUTH0_DOMAIN", "amun-ai.eu.auth0.com")
AUTH0_AUDIENCE = env.get("AUTH0_AUDIENCE", "https://amun-ai.eu.auth0.com/api/v2/")
AUTH0_ISSUER = env.get("AUTH0_ISSUER", "https://amun.ai/")
AUTH0_NAMESPACE = env.get("AUTH0_NAMESPACE", "https://amun.ai/")
JWT_SECRET = env.get("JWT_SECRET")

if not JWT_SECRET:
logger.warning("JWT_SECRET is not defined")
logger.warning(
"JWT_SECRET is not defined, you will need a fixed JWT_SECRET for clients to reconnect"
)
JWT_SECRET = shortuuid.ShortUUID().random(length=22)


Expand Down

0 comments on commit 956a52e

Please sign in to comment.