Skip to content

Commit 09c9498

Browse files
authored
update langfuse docs to include org-level OAuth access restrictions (#1570)
* update langfuse docs to include org-level OAuth acces restrictions * fix formatting
1 parent d7f5a37 commit 09c9498

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/hub/spaces-sdks-docker-langfuse.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,25 @@ To get started, click the button above or follow these steps:
4848

4949
Your Langfuse Space is pre-configured with Hugging Face OAuth for secure authentication, so you'll need to authorize `read` access to your Hugging Face account upon first login by following the instructions in the pop-up.
5050

51+
Once inside the app, you can use [the native Langfuse features](https://langfuse.com/docs/rbac) to manage Organizations, Projects, and Users.
52+
5153
The Langfuse space _must_ be set to **public** visibility so that Langfuse API/SDK's can reach the app. This means that by default, _any_ logged-in Hugging Face user will be able to access the Langfuse space.
5254

53-
You can prevent new users from signing up and accessing the space by setting the `AUTH_DISABLE_SIGNUP` environment variable to `true`. Be sure that you've first signed in & authenticated to the space before setting this variable else your own user profile won't be able to authenticate.
55+
You can prevent new users from signing up and accessing the space via two different methods:
5456

55-
Once inside the app, you can use [the native Langfuse features](https://langfuse.com/docs/rbac) to manage Organizations, Projects, and Users.
57+
#### 1. (Recommended) Hugging Face native org-level OAuth restrictions
58+
59+
If you want to restrict access to only members of a specified organization(s), you can simply set the `hf_oauth_authorized_org` metadata field in the space's `README.md` file, as shown [here](https://huggingface.co/docs/hub/spaces-oauth#create-an-oauth-app).
60+
61+
Once configured, only users who are members of the specified organization(s) will be able to access the space.
62+
63+
#### 2. Manual access control
64+
65+
You can also restrict access on a per-user basis by setting the `AUTH_DISABLE_SIGNUP` environment variable to `true`. Be sure that you've first signed in & authenticated to the space before setting this variable else your own user profile won't be able to authenticate.
5666

5767
> [!TIP]
5868
> **Note:** If you've set the `AUTH_DISABLE_SIGNUP` environment variable to `true` to restrict access, and want to grant a new user access to the space, you'll need to first set it back to `false` (wait for rebuild to complete), add the user and have them authenticate with OAuth, and then set it back to `true`.
5969
60-
6170
## Step 2: Use Langfuse
6271

6372
Now that you have Langfuse running, you can start instrumenting your LLM application to capture traces and manage your prompts. Let's see how!

0 commit comments

Comments
 (0)