diff --git a/help/en/docs/install/oidc.md b/help/en/docs/install/oidc.md index 87dfef4d4..4121ccd1d 100644 --- a/help/en/docs/install/oidc.md +++ b/help/en/docs/install/oidc.md @@ -41,6 +41,7 @@ Expected environment variables: * `GRIST_OIDC_IDP_EXTRA_CLIENT_METADATA` (optional) - A JSON object with extra client metadata to pass to openid-client. Be aware that setting this object may override any other values passed to the openid client. More info: https://github.com/panva/node-openid-client/tree/main/docs#new-clientmetadata-jwks-options + * `GRIST_OIDC_SP_IGNORE_EMAIL_VERIFIED` (optional) - Set to `true` to disable the email verification. Useful when the error `error: OIDC callback failed: Error: OIDCConfig: email not verified for username@example.com` occurs, but beware to control email used on the OIDC provider. ## Example: Gitlab @@ -65,6 +66,29 @@ GRIST_OIDC_IDP_SKIP_END_SESSION_ENDPOINT=true This format is suitable for an `.env` file or similar. From a shell invocation, remember to quote values with spaces, such as `GRIST_OIDC_IDP_SCOPES="openid profile email"`. +## Example: Gitea + +In the application admin settings, on Integrations then Application, set the redirect URI to `https:///oauth2/callback` (or `http://localhost:8484/oauth2/callback` if tested locally, and change `8484` to the port you listen on). + +Once the application is set up, start Grist with these settings: + +```shell +GRIST_OIDC_SP_HOST=https:// # or http://localhost:8484 +GRIST_OIDC_IDP_ISSUER=https:// # the /.well-known/openid-configuration part is added automatically +GRIST_OIDC_IDP_SCOPES=openid profile email + +# the client ID generated by Gitea for the application +GRIST_OIDC_IDP_CLIENT_ID=... + +# the client secret generated by Gitea for the application +GRIST_OIDC_IDP_CLIENT_SECRET=... + +# Gitlab doesn't propose `end_session_endpoint` +GRIST_OIDC_IDP_SKIP_END_SESSION_ENDPOINT=true +``` + +This format is suitable for an `.env` file or similar. From a shell invocation, remember to quote values with spaces, such as `GRIST_OIDC_IDP_SCOPES="openid profile email"`. + ## Example: Auth0 Create an application in Auth0 [as explained in this documentation](https://auth0.com/docs/get-started/auth0-overview/create-applications) (you can select the app type named `Regular Web Applications`). Once the application is created, ensure to add at least the following configuration for the app: diff --git a/help/fr/docs/install/oidc.md b/help/fr/docs/install/oidc.md index e75f4a8dc..c27689199 100644 --- a/help/fr/docs/install/oidc.md +++ b/help/fr/docs/install/oidc.md @@ -40,6 +40,7 @@ Variables d'environnement attendues : * `GRIST_OIDC_IDP_EXTRA_CLIENT_METADATA` (optionnel) - Un objet JSON avec des métadonnées client supplémentaires à passer à openid-client. Sachez que la définition de cet objet peut remplacer toutes les autres valeurs passées au client openid. Plus d'infos : https://github.com/panva/node-openid-client/tree/main/docs#new-clientmetadata-jwks-options + * `GRIST_OIDC_SP_IGNORE_EMAIL_VERIFIED` (optionnel) - À définir à `true` pour désactiver la vérification des emails. Utile quand l'erreur `error: OIDC callback failed: Error: OIDCConfig: email not verified for username@example.com` survient, mais faire attention à contrôler les emails utilisés au niveau du fournisseur OIDC. ## Exemple : Gitlab @@ -64,6 +65,29 @@ GRIST_OIDC_IDP_SKIP_END_SESSION_ENDPOINT=true Ce format est adapté pour un fichier `.env` ou similaire. Lors d'une invocation shell, n'oubliez pas de citer les valeurs avec des espaces, comme `GRIST_OIDC_IDP_SCOPES="openid profile email"`. +## Exemple : Gitea + +Dans les paramètres d'administration de l'application, au niveau des intégrations d'applications, définissez l'URI de redirection sur `https:///oauth2/callback` (ou `http://localhost:8484/oauth2/callback` si testé localement, et changez `8484` pour le port que vous écoutez). + +Une fois l'application configurée, démarrez Grist avec ces paramètres : + +```shell +GRIST_OIDC_SP_HOST=https:// # ou http://localhost:8484 +GRIST_OIDC_IDP_ISSUER=https:// # le /.well-known/openid-configuration est ajouté automatiquement +GRIST_OIDC_IDP_SCOPES=openid profile email + +# l'ID client généré par Gitea pour l'application +GRIST_OIDC_IDP_CLIENT_ID=... + +# le secret client généré par Gitea pour l'application +GRIST_OIDC_IDP_CLIENT_SECRET=... + +# Gitea ne propose pas `end_session_endpoint` +GRIST_OIDC_IDP_SKIP_END_SESSION_ENDPOINT=true +``` + +Ce format est adapté pour un fichier `.env` ou similaire. Lors d'une invocation shell, n'oubliez pas de citer les valeurs avec des espaces, comme `GRIST_OIDC_IDP_SCOPES="openid profile email"`. + ## Exemple : Auth0 Créez une application dans Auth0 [comme expliqué dans cette documentation](https://auth0.com/docs/get-started/auth0-overview/create-applications) (vous pouvez sélectionner le type d'application nommé `Regular Web Applications`). Une fois l'application créée, assurez-vous d'ajouter au moins la configuration suivante pour l'application :