From d7f5a37858f77b776b537979b3c5467ddd6e71dc Mon Sep 17 00:00:00 2001 From: "Eliott C." Date: Mon, 13 Jan 2025 13:19:55 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Document=20hf=5Fauthorized=5Forg?= =?UTF-8?q?=20(#1569)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/hub/spaces-config-reference.md | 3 +++ docs/hub/spaces-oauth.md | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/hub/spaces-config-reference.md b/docs/hub/spaces-config-reference.md index cbc714d97..21a038109 100644 --- a/docs/hub/spaces-config-reference.md +++ b/docs/hub/spaces-config-reference.md @@ -91,6 +91,9 @@ Authorized scopes of the connected OAuth app. `openid` and `profile` are authori **`hf_oauth_expiration_minutes`** : _int_ Duration of the OAuth token in minutes. Defaults to 480 minutes (8 hours). Maximum duration is 43200 minutes (30 days). See [Adding a Sign-In with HF button to your space](https://huggingface.co/docs/hub/spaces-oauth) for more details. +**`hf_oauth_authorized_org`** : _string_ or _List[string]_ +Restrict OAuth access to members of specific organizations. See [Adding a Sign-In with HF button to your space](https://huggingface.co/docs/hub/spaces-oauth) for more details. + **`disable_embedding`** : _boolean_ Whether the Space iframe can be embedded in other websites. Defaults to false, i.e. Spaces *can* be embedded. diff --git a/docs/hub/spaces-oauth.md b/docs/hub/spaces-oauth.md index b4a506790..7323e7c7a 100644 --- a/docs/hub/spaces-oauth.md +++ b/docs/hub/spaces-oauth.md @@ -41,6 +41,11 @@ hf_oauth_scopes: - write-repos - manage-repos - inference-api +# optional, restrict access to members of specific organizations +hf_oauth_authorized_org: ORG_NAME +hf_oauth_authorized_org: + - ORG_NAME1 + - ORG_NAME2 ``` You can check out the [configuration reference docs](./spaces-config-reference) for more information.