You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Enable automatic provisioning if phpMyFAQ should create local users on first successful Keycloak login
904
919
- Enable automatic group assignment if phpMyFAQ should assign local groups from Keycloak roles
920
+
- Enable group synchronization on login if phpMyFAQ should remove stale memberships for mapped Keycloak groups
905
921
- Add a JSON role-to-group mapping if Keycloak role names should map to different phpMyFAQ group names
906
922
- Set a logout redirect URL if users should return to a specific page after provider logout
923
+
- Use a JSON mapping such as `{"admin":"Administrators","faq-editors":"Editors"}` if Keycloak role names and phpMyFAQ group names differ
907
924
908
925
phpMyFAQ resolves users in this order:
909
926
910
-
1. preferred username from Keycloak
911
-
2. existing user by email address
912
-
3. automatic provisioning if enabled
927
+
1. existing user linked by stored Keycloak subject (`sub`)
928
+
2. preferred username from Keycloak
929
+
3. existing user by email address
930
+
4. automatic provisioning if enabled
913
931
914
932
If automatic provisioning is disabled, users must already exist in phpMyFAQ before they can sign in with Keycloak.
915
933
916
-
Group assignment is additive in the current implementation:
934
+
Group assignment behavior:
917
935
918
-
-mapped or unmapped Keycloak roles can create phpMyFAQ groups automatically
936
+
-only roles listed in the JSON mapping are managed by phpMyFAQ
919
937
- matched groups are added to the user on login
920
-
- existing phpMyFAQ group memberships are not removed automatically
938
+
- if group synchronization on login is enabled, stale memberships for mapped groups are removed during login
939
+
- phpMyFAQ groups outside the configured Keycloak mapping are left untouched
940
+
941
+
Troubleshooting:
942
+
943
+
- If login works but logout does not return to phpMyFAQ, verify `Valid post logout redirect URI` in Keycloak and `keycloak.logoutRedirectUrl` in phpMyFAQ
944
+
- If users are created but not added to groups, make sure permission level `medium` is enabled and the Keycloak roles actually match your JSON mapping keys
945
+
- If an existing user cannot log in, check whether the stored Keycloak subject (`sub`) is already linked to a different account
|`keycloak.autoProvision`| Automatically create phpMyFAQ users on first Keycloak login |`false`| When enabled, phpMyFAQ creates a local user automatically if no matching account exists yet. |
135
135
|`keycloak.groupAutoAssign`| Automatically assign phpMyFAQ groups from Keycloak roles |`false`| When enabled and permission level `medium` is active, phpMyFAQ assigns users to groups derived from Keycloak roles on login. |
136
-
|`keycloak.groupMapping`| Role to group mapping |*(empty)*| JSON object mapping Keycloak role names to phpMyFAQ group names, for example `{"admin":"Administrators"}`. Unmapped roles keep their original name. |
137
-
|`keycloak.logoutRedirectUrl`| Logout redirect URL |*(empty)*| URL users should be redirected to after logging out from Keycloak. |
136
+
|`keycloak.groupSyncOnLogin`| Synchronize mapped phpMyFAQ groups on login |`false`| When enabled, phpMyFAQ also removes stale memberships for groups managed by the Keycloak role mapping during login. |
137
+
|`keycloak.groupMapping`| Role to group mapping |*(empty)*| JSON object mapping Keycloak role names to phpMyFAQ group names, for example `{"admin":"Administrators","faq-editors":"Editors"}`. Only mapped roles are managed for assignment and synchronization. |
138
+
|`keycloak.logoutRedirectUrl`| Logout redirect URL |*(empty)*| URL users should be redirected to after logging out from Keycloak, for example `https://faq.example.com/`. |
138
139
|`security.enableGoogleReCaptchaV2`| Enable Invisible Google ReCAPTCHA v2 |`false`| Enables Google reCAPTCHA v2 to protect forms from spam and abuse. |
139
140
|`security.googleReCaptchaV2SiteKey`| Google ReCAPTCHA v2 site key |*(empty)*| The site key from your Google reCAPTCHA v2 registration. |
140
141
|`security.googleReCaptchaV2SecretKey`| Google ReCAPTCHA v2 secret key |*(empty)*| The secret key from your Google reCAPTCHA v2 registration. |
0 commit comments