Skip to content

Commit b68c704

Browse files
cbcoutinhoclaude
andcommitted
refactor: Remove unnecessary user_oidc patch - CORSMiddleware patch is sufficient
Testing confirmed that the CORSMiddleware Bearer token patch (from upstream commit 8fb5e77db82) alone is sufficient to enable Bearer token authentication for all Nextcloud APIs, including app-specific endpoints like Notes and Calendar. The user_oidc patch (which sets the app_api session flag) is not required when the CORSMiddleware patch is applied, as it fixes the root cause by allowing Bearer tokens to bypass CORS/CSRF checks at the framework level. Validation: - Restarted Nextcloud with user_oidc patch disabled - Ran all 11 Keycloak integration tests - All tests passed without the user_oidc patch Updated documentation in 10-install-user_oidc-app.sh to explain why the patch is no longer needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 849c67c commit b68c704

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app-hooks/post-installation/10-install-user_oidc-app.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ php /var/www/html/occ config:system:set user_oidc httpclient.allowselfsigned --v
1515
# This enables user_oidc to fetch JWKS from internal Keycloak container
1616
php /var/www/html/occ config:system:set allow_local_remote_servers --value=true --type=boolean
1717

18-
patch -u /var/www/html/custom_apps/user_oidc/lib/User/Backend.php -i /docker-entrypoint-hooks.d/patches/0001-Fix-Bearer-token-authentication-causing-session-logo.patch
18+
# Note: The user_oidc app_api session flag patch is NOT required when using the
19+
# CORSMiddleware Bearer token patch (20-apply-cors-bearer-token-patch.sh).
20+
# The CORSMiddleware patch fixes the root cause by allowing Bearer tokens to bypass
21+
# CORS/CSRF checks at the framework level.

0 commit comments

Comments
 (0)