Skip to content

Commit

Permalink
✨ Document oauth duration for spaces (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 authored Feb 28, 2024
1 parent f18db2a commit 1afd241
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/hub/spaces-config-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Whether a connected OAuth app is associated to this Space. See [Adding a Sign-In
**`hf_oauth_scopes`** : _List[string]_
Authorized scopes of the connected OAuth app. `openid` and `profile` are authorized by default and do not need this parameter. See [Adding a Sign-In with HF button to your space](https://huggingface.co/docs/hub/spaces-oauth) for more details.

**`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.

**`disable_embedding`** : _boolean_
Whether the Space iframe can be embedded in other websites.
Defaults to false, i.e. Spaces *can* be embedded.
Expand Down
2 changes: 2 additions & 0 deletions docs/hub/spaces-oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ python_version: 3.10.6
app_file: app.py

hf_oauth: true
# optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.
hf_oauth_expiration_minutes: 480
# optional, see "Scopes" below. "openid profile" is always included.
hf_oauth_scopes:
- read-repos
Expand Down

0 comments on commit 1afd241

Please sign in to comment.