Skip to content

Commit 3468ddf

Browse files
Add docs for keycloak users-permissions provider (#2048)
* feat: Add docs for keycloak users-permissions provider * Update docusaurus/docs/dev-docs/plugins/users-permissions.md * Update docusaurus/docs/dev-docs/plugins/users-permissions.md * Update docusaurus/docs/dev-docs/plugins/users-permissions.md --------- Co-authored-by: Pierre Wizla <[email protected]>
1 parent 4d12cea commit 3468ddf

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docusaurus/docs/dev-docs/plugins/users-permissions.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,39 @@ Version 2 is probably the best choice. See their
869869
- Client ID: `<Your Patreon Client ID>` - as above
870870
- Client Secret: `<Your Patreon Client Secret>` - as above
871871

872+
</TabItem>
873+
874+
<TabItem title="Keycloak" value="Keycloak">
875+
876+
<h4 id="keycloak">Using ngrok</h4>
877+
878+
Keycloak accepts the `localhost` urls. <br/>
879+
The use of `ngrok` is not needed.
880+
881+
<h4 id="keycloak-config">Keycloak configuration</h4>
882+
883+
- Visit your Keycloak admin dashboard
884+
- If you don't already have a realm, you'll want to create one
885+
- In the Clients section of your realm, create a new client
886+
- Under the capability config, ensure you set `Client Authentication` to on to ensure you can create a private key
887+
- Under the access settings, ensure you set the following values:
888+
- **Valid redirect URIs**: `http://localhost:1337/api/connect/keycloak/callback` and `http://localhost:1337/api/connect/keycloak`
889+
- **Allowed Web Origins**: `http://localhost:3000` and `http://localhost:1337`
890+
- In the Client Scopes section, ensure you have the `email` and `profile` scopes set to default
891+
- In the Client Scopes section, ensure you have the `openid` scope set to default, if you don't have this you will need to manually create it in the global Client Scopes
892+
893+
<h4 id="keycloak-strapi-config">Strapi configuration</h4>
894+
895+
- Visit the User Permissions provider settings page <br/> [http://localhost:1337/admin/settings/users-permissions/providers](http://localhost:1337/admin/settings/users-permissions/providers)
896+
- Click on the **Keycloak** provider
897+
- Fill the information:
898+
- Enable: `ON`
899+
- Client ID: `<Your Keycloak Client ID>`
900+
- Client Secret: `<Your Keycloak Client Secret>`
901+
- Subdomain: `<Your Keycloak realm url>`, example is either `keycloak.example.com/realms/strapitest` or `keycloak.example.com/auth/realms/strapitest` **without the protocol before it**
902+
- The redirect URL to your front-end app: `http://localhost:3000/connect/keycloak/redirect`
903+
- (Optional) Set the JWKS URL if you have a custom JWKS URL, example is like `https://keycloak.example.com/auth/realms/strapitest/protocol/openid-connect/certs`
904+
872905
</TabItem>
873906
</Tabs>
874907

0 commit comments

Comments
 (0)