From 1afd2417871d231fc8968d3db36168a7747e2bf5 Mon Sep 17 00:00:00 2001 From: Eliott C Date: Wed, 28 Feb 2024 11:47:04 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Document=20oauth=20duration=20for?= =?UTF-8?q?=20spaces=20(#1227)?= 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 | 2 ++ 2 files changed, 5 insertions(+) diff --git a/docs/hub/spaces-config-reference.md b/docs/hub/spaces-config-reference.md index f83d1400f..f83d566cc 100644 --- a/docs/hub/spaces-config-reference.md +++ b/docs/hub/spaces-config-reference.md @@ -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. diff --git a/docs/hub/spaces-oauth.md b/docs/hub/spaces-oauth.md index 09abc5c10..8bfde571f 100644 --- a/docs/hub/spaces-oauth.md +++ b/docs/hub/spaces-oauth.md @@ -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