From 511de48cbfb88d721a979215a0143c55f0f36b3f Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:17:17 +0100 Subject: [PATCH 01/20] initial release --- .../services/pocketbase/index.mdx | 87 +++++++++++++++++++ website/sidebarsIntegrations.js | 1 + 2 files changed, 88 insertions(+) create mode 100644 website/integrations/services/pocketbase/index.mdx diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx new file mode 100644 index 000000000000..0e81406ae5f5 --- /dev/null +++ b/website/integrations/services/pocketbase/index.mdx @@ -0,0 +1,87 @@ +--- +title: Integrate with PocketBase +sidebar_label: PocketBase +--- + +# Integrate With PocketBase + +Support level: Community + +## What is PocketBase + +> PocketBase is a lightweight backend solution that provides a built-in database, authentication, and file storage. +> It allows developers to quickly set up and manage backend services without complex configurations. +> With its simple API and easy-to-use dashboard, it's perfect for small projects, prototypes, or even full-scale applications. +> +> -- https://pocketbase.io/ +> +> This guide explains how to configure PocketBase to use authentik as the OAuth provider for logging in to the Web GUI. + +:::note +If you are using an application that relies on PocketBase as its backend, you can replace the placeholders used here with the application's name. +::: + + +## Preparation + +The following placeholders are used in this guide: + +- `pocketbase.company` is the FQDN of the PocketBase installation. +- `authentik.company` is the FQDN of the authentik installation. + +:::note +This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application. +::: + +## authentik configuration + +Start the wizard for adding a new application. + +**1. Application:** + +- Name: `PocketBase` +- Slug: `pocketbase` + +**2. Choose a Provider** + +Select `OAuth2/OpenID Provider` + +**3. Configure Provider** + +Select implicit or explicit authorization flow as desired. + +Take note of the Client ID and Client Secret, you'll need to give them to PocketBase later. + +- Redirect URIs/Origins (RegEx): `https://_pocketbase.company_/api/oauth2-redirect` +- Signing Key: Select any available signing keys. + +Leave the rest as default values. + +## PocketBase configuration + +1. Sign in to Beszel with a browser of your choice and access the system setting by using this URL https://_pocketbase.company_/_/#/settings. + +2. Disable **Hide collection create and edit controls** and click **Save changes**. + +3. Open the **users** submenu by clicking the **Collections** icon in the left menu or by accessing this URL: https://_pocketbase.company_/_/#/collections?collection=pb_users_auth. + +4. Click the gear icon next to **users**, then select the **Options** tab. + +5. Enable **OAuth2** by toggling the corresponding switch. + +6. Click **+ Add provider** and select **OpenID Connect**. + +7. Enter the following details from the authentik provider: + - Set **Client ID** to _client-id_ + - Set **Client secret** to _client-secret_ + - Set **Display name** to **authentik** + - Set **Auth URL** to https://_authentik.company_/application/o/authorize/ + - Set **Token URL** to https://_authentik.company_/application/o/token/ + - Set **User info URL** to https://_authentik.company_/application/o/userinfo/ + +## Test the login + +- Open your web browser and go to: https://_pocketbase.company_/#/login. +- Click **authentik** to log in. +- You should be redirected to authentik (following the login flow you configured). After logging in, authentik will redirect you back to https://_pocketbase.company_. +- If you successfully return to the PocketBase WebGUI, the login is working correctly. diff --git a/website/sidebarsIntegrations.js b/website/sidebarsIntegrations.js index cd1637da15a1..0ee827ccc313 100644 --- a/website/sidebarsIntegrations.js +++ b/website/sidebarsIntegrations.js @@ -161,6 +161,7 @@ module.exports = { label: "Platforms", items: [ "services/budibase/index", + "services/pocketbase/index", "services/wordpress/index", ], }, From 2b31de3f858e3696242532816ccf6bd5a0fce60d Mon Sep 17 00:00:00 2001 From: nicedevil007 Date: Fri, 31 Jan 2025 21:28:12 +0000 Subject: [PATCH 02/20] Ready for PR --- authentik/lib/sync/outgoing/models.py | 6 +++--- package.json | 20 ++++++++++++++++++- .../services/pocketbase/index.mdx | 5 ++--- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/authentik/lib/sync/outgoing/models.py b/authentik/lib/sync/outgoing/models.py index 72657c3302ec..e46fb529f7d1 100644 --- a/authentik/lib/sync/outgoing/models.py +++ b/authentik/lib/sync/outgoing/models.py @@ -22,9 +22,9 @@ class OutgoingSyncProvider(Model): class Meta: abstract = True - def client_for_model[T: User | Group]( - self, model: type[T] - ) -> BaseOutgoingSyncClient[T, Any, Any, Self]: + def client_for_model[ + T: User | Group + ](self, model: type[T]) -> BaseOutgoingSyncClient[T, Any, Any, Self]: raise NotImplementedError def get_object_qs[T: User | Group](self, type: type[T]) -> QuerySet[T]: diff --git a/package.json b/package.json index 67762574db20..9d281d9089ee 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,23 @@ { "name": "@goauthentik/authentik", "version": "2024.12.3", - "private": true + "private": true, + "devDependencies": { + "@docusaurus/core": "^3.7.0", + "@docusaurus/preset-classic": "^3.7.0", + "@docusaurus/react-loadable": "^6.0.0", + "@docusaurus/theme-mermaid": "^3.7.0", + "cross-env": "^7.0.3", + "docusaurus-plugin-openapi-docs": "^4.3.3", + "docusaurus-plugin-redoc": "^2.2.1", + "docusaurus-theme-openapi-docs": "^4.3.3", + "prism-react-renderer": "^2.4.1", + "react": "^18.3.1", + "react-before-after-slider-component": "^1.1.8", + "react-dom": "^18.3.1", + "react-feather": "^2.0.10", + "remark-github": "^12.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0" + } } diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 0e81406ae5f5..0db1117f9d81 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -21,7 +21,6 @@ sidebar_label: PocketBase If you are using an application that relies on PocketBase as its backend, you can replace the placeholders used here with the application's name. ::: - ## Preparation The following placeholders are used in this guide: @@ -59,11 +58,11 @@ Leave the rest as default values. ## PocketBase configuration -1. Sign in to Beszel with a browser of your choice and access the system setting by using this URL https://_pocketbase.company_/_/#/settings. +1. Sign in to Beszel with a browser of your choice and access the system setting by using this URL https://_pocketbase.company_/\_/#/settings. 2. Disable **Hide collection create and edit controls** and click **Save changes**. -3. Open the **users** submenu by clicking the **Collections** icon in the left menu or by accessing this URL: https://_pocketbase.company_/_/#/collections?collection=pb_users_auth. +3. Open the **users** submenu by clicking the **Collections** icon in the left menu or by accessing this URL: https://_pocketbase.company_/\_/#/collections?collection=pb_users_auth. 4. Click the gear icon next to **users**, then select the **Options** tab. From f133646329fb579beda55b175fa68bb8a53ce035 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:34:57 +0100 Subject: [PATCH 03/20] rollback to default package.json Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- package.json | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/package.json b/package.json index 9d281d9089ee..67762574db20 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,5 @@ { "name": "@goauthentik/authentik", "version": "2024.12.3", - "private": true, - "devDependencies": { - "@docusaurus/core": "^3.7.0", - "@docusaurus/preset-classic": "^3.7.0", - "@docusaurus/react-loadable": "^6.0.0", - "@docusaurus/theme-mermaid": "^3.7.0", - "cross-env": "^7.0.3", - "docusaurus-plugin-openapi-docs": "^4.3.3", - "docusaurus-plugin-redoc": "^2.2.1", - "docusaurus-theme-openapi-docs": "^4.3.3", - "prism-react-renderer": "^2.4.1", - "react": "^18.3.1", - "react-before-after-slider-component": "^1.1.8", - "react-dom": "^18.3.1", - "react-feather": "^2.0.10", - "remark-github": "^12.0.0", - "remark-parse": "^11.0.0", - "remark-stringify": "^11.0.0" - } + "private": true } From a995ff939001b615861edb5e9f94cbc5979360cb Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:36:06 +0100 Subject: [PATCH 04/20] rollback to default again Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- authentik/lib/sync/outgoing/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/authentik/lib/sync/outgoing/models.py b/authentik/lib/sync/outgoing/models.py index e46fb529f7d1..72657c3302ec 100644 --- a/authentik/lib/sync/outgoing/models.py +++ b/authentik/lib/sync/outgoing/models.py @@ -22,9 +22,9 @@ class OutgoingSyncProvider(Model): class Meta: abstract = True - def client_for_model[ - T: User | Group - ](self, model: type[T]) -> BaseOutgoingSyncClient[T, Any, Any, Self]: + def client_for_model[T: User | Group]( + self, model: type[T] + ) -> BaseOutgoingSyncClient[T, Any, Any, Self]: raise NotImplementedError def get_object_qs[T: User | Group](self, type: type[T]) -> QuerySet[T]: From cb52a38185828e7593eb5a04090e66e3bae136c9 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:37:26 +0100 Subject: [PATCH 05/20] last one I missed... Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 0db1117f9d81..30f790ec3062 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -58,7 +58,7 @@ Leave the rest as default values. ## PocketBase configuration -1. Sign in to Beszel with a browser of your choice and access the system setting by using this URL https://_pocketbase.company_/\_/#/settings. +1. Sign in to PocketBase with a browser of your choice and access the system setting by using this URL https://_pocketbase.company_/\_/#/settings. 2. Disable **Hide collection create and edit controls** and click **Save changes**. From 6d07e9fd2481d7976df0113d9deef12fa80cdf67 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:38:25 +0100 Subject: [PATCH 06/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 30f790ec3062..3290eb7c1f66 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -58,7 +58,7 @@ Leave the rest as default values. ## PocketBase configuration -1. Sign in to PocketBase with a browser of your choice and access the system setting by using this URL https://_pocketbase.company_/\_/#/settings. +1. Sign in to PocketBase and access the superusers dashboard by navigating to https://pocketbase.company/_/#/settings. 2. Disable **Hide collection create and edit controls** and click **Save changes**. From 34fdcd3713c617f80388229855bf6030c6653d9b Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:38:49 +0100 Subject: [PATCH 07/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 3290eb7c1f66..1c96b7281235 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -60,7 +60,7 @@ Leave the rest as default values. 1. Sign in to PocketBase and access the superusers dashboard by navigating to https://pocketbase.company/_/#/settings. -2. Disable **Hide collection create and edit controls** and click **Save changes**. +2. Toggle off **Hide collection create and edit controls**," then click the **Save changes** button. 3. Open the **users** submenu by clicking the **Collections** icon in the left menu or by accessing this URL: https://_pocketbase.company_/\_/#/collections?collection=pb_users_auth. From 8446153ffb7bfc9288b4ad9a53de3ffe5d98cd8b Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:39:41 +0100 Subject: [PATCH 08/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 1c96b7281235..d1e2eb6441f2 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -62,7 +62,7 @@ Leave the rest as default values. 2. Toggle off **Hide collection create and edit controls**," then click the **Save changes** button. -3. Open the **users** submenu by clicking the **Collections** icon in the left menu or by accessing this URL: https://_pocketbase.company_/\_/#/collections?collection=pb_users_auth. +3. Open the **users** collection by clicking the **Collections** icon on the sidebar or head to https://pocketbase.company/_/#/collections?collection=pb_users_auth. 4. Click the gear icon next to **users**, then select the **Options** tab. From 125037d6f2128258a7db486daee3aa733c4d7471 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:40:21 +0100 Subject: [PATCH 09/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index d1e2eb6441f2..557c83f5dd2d 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -64,7 +64,7 @@ Leave the rest as default values. 3. Open the **users** collection by clicking the **Collections** icon on the sidebar or head to https://pocketbase.company/_/#/collections?collection=pb_users_auth. -4. Click the gear icon next to **users**, then select the **Options** tab. +4. Click the gear icon next to the collection's name, then select the **Options** tab in the popup on the right. 5. Enable **OAuth2** by toggling the corresponding switch. From 49899180c3e64b05658c6335264abdd16f22497b Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:40:51 +0100 Subject: [PATCH 10/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 557c83f5dd2d..3522aa19f025 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -66,7 +66,7 @@ Leave the rest as default values. 4. Click the gear icon next to the collection's name, then select the **Options** tab in the popup on the right. -5. Enable **OAuth2** by toggling the corresponding switch. +5. Enable the **OAuth2** authentication method by clicking the **OAuth2** tab and toggling **Enable**. 6. Click **+ Add provider** and select **OpenID Connect**. From 3b7b181bf6a13546f0612414cdf531df6a85c86a Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:41:13 +0100 Subject: [PATCH 11/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 3522aa19f025..0a7ceb579dc1 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -68,7 +68,7 @@ Leave the rest as default values. 5. Enable the **OAuth2** authentication method by clicking the **OAuth2** tab and toggling **Enable**. -6. Click **+ Add provider** and select **OpenID Connect**. +6. Click **+ Add provider**, then select **OpenID Connect**. 7. Enter the following details from the authentik provider: - Set **Client ID** to _client-id_ From 37e6e5b5cde1b2e3535f71cd282024c550b8c4e3 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:42:45 +0100 Subject: [PATCH 12/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 0a7ceb579dc1..856687cfd6dd 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -71,7 +71,7 @@ Leave the rest as default values. 6. Click **+ Add provider**, then select **OpenID Connect**. 7. Enter the following details from the authentik provider: - - Set **Client ID** to _client-id_ + - Set **Client ID** to the Client ID copied from authentik. - Set **Client secret** to _client-secret_ - Set **Display name** to **authentik** - Set **Auth URL** to https://_authentik.company_/application/o/authorize/ From 590520ee4e402f1d5f8c0bfc0d29c07af45250c3 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:43:04 +0100 Subject: [PATCH 13/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 856687cfd6dd..8d4bc24491cc 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -72,7 +72,7 @@ Leave the rest as default values. 7. Enter the following details from the authentik provider: - Set **Client ID** to the Client ID copied from authentik. - - Set **Client secret** to _client-secret_ + - Set **Client secret** to the Client Secret copied from authentik. - Set **Display name** to **authentik** - Set **Auth URL** to https://_authentik.company_/application/o/authorize/ - Set **Token URL** to https://_authentik.company_/application/o/token/ From 8e3bdcfdec2ce79dd9d9020a4ef79b923db7b834 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:43:19 +0100 Subject: [PATCH 14/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 8d4bc24491cc..c747553a99b4 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -74,7 +74,7 @@ Leave the rest as default values. - Set **Client ID** to the Client ID copied from authentik. - Set **Client secret** to the Client Secret copied from authentik. - Set **Display name** to **authentik** - - Set **Auth URL** to https://_authentik.company_/application/o/authorize/ + - Set **Auth URL** to https://authentik.company/application/o/authorize/. - Set **Token URL** to https://_authentik.company_/application/o/token/ - Set **User info URL** to https://_authentik.company_/application/o/userinfo/ From 340a9460a4830f8202353aa99a07adbb10984a56 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:43:26 +0100 Subject: [PATCH 15/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index c747553a99b4..3bb5f8580b35 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -75,7 +75,7 @@ Leave the rest as default values. - Set **Client secret** to the Client Secret copied from authentik. - Set **Display name** to **authentik** - Set **Auth URL** to https://authentik.company/application/o/authorize/. - - Set **Token URL** to https://_authentik.company_/application/o/token/ + - Set **Token URL** to https://authentik.company/application/o/token/. - Set **User info URL** to https://_authentik.company_/application/o/userinfo/ ## Test the login From 4ef4c1400b8e13d5f961061a76cb4497bda96b69 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:43:55 +0100 Subject: [PATCH 16/20] index.mdx aktualisieren Co-authored-by: dominic-r Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 3bb5f8580b35..b2af657323fc 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -76,7 +76,7 @@ Leave the rest as default values. - Set **Display name** to **authentik** - Set **Auth URL** to https://authentik.company/application/o/authorize/. - Set **Token URL** to https://authentik.company/application/o/token/. - - Set **User info URL** to https://_authentik.company_/application/o/userinfo/ + - Make sure **Fetch user info from** is set to `User info URL`, then set **User info URL** to https://authentik.company/application/o/userinfo/ ## Test the login From 1508e4998ce5d466c84cd72999b18e80747441d3 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:50:21 +0100 Subject: [PATCH 17/20] index.mdx aktualisieren Co-authored-by: Dominic R Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index b2af657323fc..6b6a8dd9e1cf 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -73,7 +73,7 @@ Leave the rest as default values. 7. Enter the following details from the authentik provider: - Set **Client ID** to the Client ID copied from authentik. - Set **Client secret** to the Client Secret copied from authentik. - - Set **Display name** to **authentik** + - Set **Display name** to `authentik`. - Set **Auth URL** to https://authentik.company/application/o/authorize/. - Set **Token URL** to https://authentik.company/application/o/token/. - Make sure **Fetch user info from** is set to `User info URL`, then set **User info URL** to https://authentik.company/application/o/userinfo/ From 9a983b314af56b3e19f118c4026f725290b55af4 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:51:20 +0100 Subject: [PATCH 18/20] index.mdx aktualisieren Co-authored-by: Dominic R Signed-off-by: NiceDevil <17103076+nicedevil007@users.noreply.github.com> --- website/integrations/services/pocketbase/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index 6b6a8dd9e1cf..e9945f9fa35c 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -58,7 +58,7 @@ Leave the rest as default values. ## PocketBase configuration -1. Sign in to PocketBase and access the superusers dashboard by navigating to https://pocketbase.company/_/#/settings. +1. Sign in to PocketBase and access the superusers dashboard by navigating to https://pocketbase.company/_/#/settings. 2. Toggle off **Hide collection create and edit controls**," then click the **Save changes** button. From f56b962e3168a97add5b7b52278c284319b731cf Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sun, 2 Feb 2025 09:01:17 +0100 Subject: [PATCH 19/20] Update because Fonts & Fonts styling guide --- website/integrations/services/pocketbase/index.mdx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index e9945f9fa35c..e568f9b9f4fa 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -15,7 +15,7 @@ sidebar_label: PocketBase > > -- https://pocketbase.io/ > -> This guide explains how to configure PocketBase to use authentik as the OAuth provider for logging in to the Web GUI. +> This guide explains how to configure PocketBase so that your application uses it in the backend, enabling authentik as the OAuth provider for login. :::note If you are using an application that relies on PocketBase as its backend, you can replace the placeholders used here with the application's name. @@ -51,7 +51,7 @@ Select implicit or explicit authorization flow as desired. Take note of the Client ID and Client Secret, you'll need to give them to PocketBase later. -- Redirect URIs/Origins (RegEx): `https://_pocketbase.company_/api/oauth2-redirect` +- Redirect URIs/Origins (RegEx): https://pocketbase.company/api/oauth2-redirect - Signing Key: Select any available signing keys. Leave the rest as default values. @@ -77,10 +77,3 @@ Leave the rest as default values. - Set **Auth URL** to https://authentik.company/application/o/authorize/. - Set **Token URL** to https://authentik.company/application/o/token/. - Make sure **Fetch user info from** is set to `User info URL`, then set **User info URL** to https://authentik.company/application/o/userinfo/ - -## Test the login - -- Open your web browser and go to: https://_pocketbase.company_/#/login. -- Click **authentik** to log in. -- You should be redirected to authentik (following the login flow you configured). After logging in, authentik will redirect you back to https://_pocketbase.company_. -- If you successfully return to the PocketBase WebGUI, the login is working correctly. From 458720b115bc5fd9e0b3986e0a87a76d827a083b Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Sun, 2 Feb 2025 10:05:16 +0100 Subject: [PATCH 20/20] same format as other PRs from 1-2weeks ago --- .../services/pocketbase/index.mdx | 33 ++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/website/integrations/services/pocketbase/index.mdx b/website/integrations/services/pocketbase/index.mdx index e568f9b9f4fa..c1ee93a51454 100644 --- a/website/integrations/services/pocketbase/index.mdx +++ b/website/integrations/services/pocketbase/index.mdx @@ -34,42 +34,23 @@ This documentation lists only the settings that you need to change from their de ## authentik configuration -Start the wizard for adding a new application. +[Create](https://docs.goauthentik.io/docs/add-secure-apps/applications/manage_apps#add-new-applications) an OAuth2/OpenID provider and an application in authentik. Use the following parameters for the OAuth2/OpenID provider: -**1. Application:** - -- Name: `PocketBase` -- Slug: `pocketbase` - -**2. Choose a Provider** - -Select `OAuth2/OpenID Provider` - -**3. Configure Provider** - -Select implicit or explicit authorization flow as desired. - -Take note of the Client ID and Client Secret, you'll need to give them to PocketBase later. - -- Redirect URIs/Origins (RegEx): https://pocketbase.company/api/oauth2-redirect -- Signing Key: Select any available signing keys. - -Leave the rest as default values. +1. In the authentik Admin interface, navigate to **Applications** -> **Applications**. +2. Use the wizard to create a new application and provider. During this process: + - Note the **Client ID**, **Client Secret**, and **slug** values for later use. + - Select implicit or explicit authorization flow as desired. + - Set the redirect URI to https://pocketbase.company/api/oauth2-redirect. + - Select any available signing key. ## PocketBase configuration 1. Sign in to PocketBase and access the superusers dashboard by navigating to https://pocketbase.company/_/#/settings. - 2. Toggle off **Hide collection create and edit controls**," then click the **Save changes** button. - 3. Open the **users** collection by clicking the **Collections** icon on the sidebar or head to https://pocketbase.company/_/#/collections?collection=pb_users_auth. - 4. Click the gear icon next to the collection's name, then select the **Options** tab in the popup on the right. - 5. Enable the **OAuth2** authentication method by clicking the **OAuth2** tab and toggling **Enable**. - 6. Click **+ Add provider**, then select **OpenID Connect**. - 7. Enter the following details from the authentik provider: - Set **Client ID** to the Client ID copied from authentik. - Set **Client secret** to the Client Secret copied from authentik.