Skip to content

Commit d7f5a37

Browse files
authored
πŸ“ Document hf_authorized_org (#1569)
1 parent 111001f commit d7f5a37

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

β€Ždocs/hub/spaces-config-reference.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ Authorized scopes of the connected OAuth app. `openid` and `profile` are authori
9191
**`hf_oauth_expiration_minutes`** : _int_
9292
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.
9393

94+
**`hf_oauth_authorized_org`** : _string_ or _List[string]_
95+
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.
96+
9497
**`disable_embedding`** : _boolean_
9598
Whether the Space iframe can be embedded in other websites.
9699
Defaults to false, i.e. Spaces *can* be embedded.

β€Ždocs/hub/spaces-oauth.mdβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ hf_oauth_scopes:
4141
- write-repos
4242
- manage-repos
4343
- inference-api
44+
# optional, restrict access to members of specific organizations
45+
hf_oauth_authorized_org: ORG_NAME
46+
hf_oauth_authorized_org:
47+
- ORG_NAME1
48+
- ORG_NAME2
4449
```
4550
4651
You can check out the [configuration reference docs](./spaces-config-reference) for more information.

0 commit comments

Comments
Β (0)