Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC documentation update #490

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions help/en/docs/install/oidc.md
Original file line number Diff line number Diff line change
@@ -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://<grist-domain>/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://<grist-domain> # or http://localhost:8484
GRIST_OIDC_IDP_ISSUER=https://<gitea-domain> # 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`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Gitlab doesn't propose `end_session_endpoint`
# Gitea 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:
24 changes: 24 additions & 0 deletions help/fr/docs/install/oidc.md
Original file line number Diff line number Diff line change
@@ -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://<grist-domain>/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://<grist-domain> # ou http://localhost:8484
GRIST_OIDC_IDP_ISSUER=https://<gitea-domain> # 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 :