From 41149b07c6dba08a224042d0fe05d3e9bacd2f0a Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 2 Dec 2022 09:37:48 +0100 Subject: [PATCH] :pencil: Improve Google config instructions --- .../self-hosting/configuration/builder.mdx | 19 ++++++++++++++----- .../self-hosting/configuration/viewer.mdx | 13 +++++++++++-- docker-compose.dev.yml | 3 ++- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/apps/docs/docs/self-hosting/configuration/builder.mdx b/apps/docs/docs/self-hosting/configuration/builder.mdx index 28f41ec52..38e0a7121 100644 --- a/apps/docs/docs/self-hosting/configuration/builder.mdx +++ b/apps/docs/docs/self-hosting/configuration/builder.mdx @@ -42,12 +42,21 @@ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/google | GOOGLE_CLIENT_ID | -- | The Client ID from the Google API Console | | GOOGLE_CLIENT_SECRET | -- | The Client secret from the Google API Console | -Used for Google Fonts: +Used for Google Fonts (Optional): | Parameter | Default | Description | | -------------------------- | ------- | --------------------------------------- | | NEXT_PUBLIC_GOOGLE_API_KEY | -- | The API Key from the Google API Console | +### Configuration + +https://console.developers.google.com/apis/credentials + +The "Authorized redirect URIs" used when creating the credentials must include your full domain and end in the callback path. For example, + +- For production: https://{YOUR_DOMAIN}/api/auth/callback/google +- For development: http://localhost:3000/api/auth/callback/google + ## GitHub (Auth) Used for authenticating with GitHub. By default, it uses the credentials of a Typebot-dev app. @@ -66,10 +75,10 @@ Follow the official GitLab guide for creating OAuth2 applications [here](https:/ The Authorization callback URL should be `$NEXTAUTH_URL/api/auth/callback/gitlab` | Parameter | Default | Description | -| ---------------------- | ------------------ | ------------------------------------------------------------------------------------ | --- | +| ---------------------- | ------------------ | ------------------------------------------------------------------------------------ | | GITLAB_CLIENT_ID | -- | Application client ID. Also used to check if it is enabled in the front-end | | GITLAB_CLIENT_SECRET | -- | Application secret | -| GITLAB_BASE_URL | https://gitlab.com | Base URL of the GitLab instance | | +| GITLAB_BASE_URL | https://gitlab.com | Base URL of the GitLab instance | | GITLAB_REQUIRED_GROUPS | -- | Comma-separated list of groups the user has to be a direct member of, e.g. `foo,bar` | | GITLAB_NAME | GitLab | Name of the GitLab instance, used for the SSO Login Button | @@ -104,11 +113,11 @@ Used for uploading images, videos, etc... It can be any S3 compatible object sto | S3_SECRET_KEY | -- | S3 secret key. | | S3_BUCKET | typebot | Name of the bucket where assets will be uploaded in. | | S3_PORT | -- | S3 Host port number | -| S3_ENDPOINT | -- | S3 secret key. | +| S3_ENDPOINT | -- | S3 endpoint (i.e. `s3.domain.com`). | | S3_SSL | true | Use SSL when establishing the connection. | | S3_REGION | -- | S3 region. | -Note that for AWS S3, your endpoint is usually: `https://s3..amazonaws.com` +Note that for AWS S3, your endpoint is usually: `s3..amazonaws.com` Your bucket must have the following policy that tells S3 to allow public read when an object is located under the public folder: diff --git a/apps/docs/docs/self-hosting/configuration/viewer.mdx b/apps/docs/docs/self-hosting/configuration/viewer.mdx index f671ef6e3..d2ca3c8c0 100644 --- a/apps/docs/docs/self-hosting/configuration/viewer.mdx +++ b/apps/docs/docs/self-hosting/configuration/viewer.mdx @@ -37,6 +37,15 @@ Used when executing a Google Sheets block. Make sure to set the required scopes | GOOGLE_CLIENT_ID | -- | The Client ID from the Google API Console | | GOOGLE_CLIENT_SECRET | -- | The Client secret from the Google API Console | +### Configuration + +https://console.developers.google.com/apis/credentials + +The "Authorized redirect URIs" used when creating the credentials must include your full domain and end in the callback path. For example, + +- For production: https://{YOUR_DOMAIN}/api/auth/callback/google +- For development: http://localhost:3000/api/auth/callback/google + ## S3 Storage (File upload input) Used for the file upload input. It can be any S3 compatible object storage service (Minio, Digital Oceans Space, AWS S3...) @@ -47,11 +56,11 @@ Used for the file upload input. It can be any S3 compatible object storage servi | S3_SECRET_KEY | -- | S3 secret key. | | S3_BUCKET | typebot | Name of the bucket where assets will be uploaded in. | | S3_PORT | -- | S3 Host port number | -| S3_ENDPOINT | -- | S3 secret key. | +| S3_ENDPOINT | -- | S3 endpoint (i.e. `s3.domain.com`). | | S3_SSL | true | Use SSL when establishing the connection. | | S3_REGION | -- | S3 region. | -Note that for AWS S3, your endpoint is usually: `https://s3..amazonaws.com` +Note that for AWS S3, your endpoint is usually: `s3..amazonaws.com` Your bucket must have the following policy that tells S3 to allow public read when an object is located under the public folder: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index baa862113..e6c591764 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -12,9 +12,10 @@ services: POSTGRES_PASSWORD: 'typebot' minio: image: minio/minio - command: server /data + command: server /data --console-address ":9001" ports: - '9000:9000' + - '9001:9001' environment: MINIO_ROOT_USER: minio MINIO_ROOT_PASSWORD: minio123