mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
🐛 Bug Report: OIDC not working with Cloudflare Access #491
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Rxyanlaw on GitHub.
Reproduction steps
Make a Cloudflare Access application
Add Pocket ID as custom OIDC provider
Test the OIDC provider
Cloudflare Access throws "OIDC ERROR: Failed to exchange code for token. Make sure the client secret is correct.
undefined"
I am using Pocket ID behind Traefik and used issue #11's fix to at least get to the setup page but /api/oidc/token returns 404 not found
Expected behavior
It should successfully exchange code for token and complete the authentication.
Actual Behavior
@Rxyanlaw commented on GitHub:
I fixed the issue. I had my Cloudflare Access policy on *.example.com so it was protecting every subdomain. Adding an exclusion for the authentication subdomain fixed the issue. Thank you.
@stonith404 commented on GitHub:
I'm using Pocket ID with Cloudflare Access too so there is probably something wrong with your configuration.
Are you using the Docker installation? Can you share the Traefik configuration?
@Rxyanlaw commented on GitHub:
I'm using the docker compose installation. Here is my Traefik config:
traefik.enable: true
traefik.http.routers.pocketid.rule: Host(
auth.example.com) && PathPrefix(/)traefik.http.routers.pocketid.entryPoints: https
traefik.http.services.pocketid.loadbalancer.server.port: 80`
@stonith404 commented on GitHub:
Thanks. Does a POST request to
/api/oidc/tokenreally return 404 or did you make a GET request? Additionally, do you see any errors in the logs of the container?