🐛 Bug Report: OIDC login is not working when Caddy is used as a reverse proxy for pocket-id #314

Closed
opened 2025-10-09 16:39:13 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @PawlikMateusz on GitHub.

Reproduction steps

I'm using Caddy as a reverse proxy for the pocket-id. Everything seems to be working fine, but when I'm trying to login to memos app using pocket-id I get the following error:
failed to exchange token, error: failed to exchange access token: Post "https://<HOSTNAME>/api/oidc/token": stream error: stream ID 1; INTERNAL_ERROR; received from peer

Caddyfile config:

pocket-id.<DOMAIN> {
	import default                   # tls + allowed cidr
	handle @allowed {
		reverse_proxy pocket-id:80
    }
	abort
}

Expected behavior

Successful login

Actual Behavior

I got the following error:
failed to exchange token, error: failed to exchange access token: Post "https://<HOSTNAME>/api/oidc/token": stream error: stream ID 1; INTERNAL_ERROR; received from peer

Version and Environment

pokcet-id version v0.38.0
caddy version: 2.9.1

Log Output

No response

Originally created by @PawlikMateusz on GitHub. ### Reproduction steps I'm using Caddy as a reverse proxy for the pocket-id. Everything seems to be working fine, but when I'm trying to login to memos app using pocket-id I get the following error: `failed to exchange token, error: failed to exchange access token: Post "https://<HOSTNAME>/api/oidc/token": stream error: stream ID 1; INTERNAL_ERROR; received from peer` Caddyfile config: ``` pocket-id.<DOMAIN> { import default # tls + allowed cidr handle @allowed { reverse_proxy pocket-id:80 } abort } ``` ### Expected behavior Successful login ### Actual Behavior I got the following error: `failed to exchange token, error: failed to exchange access token: Post "https://<HOSTNAME>/api/oidc/token": stream error: stream ID 1; INTERNAL_ERROR; received from peer` ### Version and Environment pokcet-id version v0.38.0 caddy version: 2.9.1 ### Log Output _No response_
OVERLORD added the bug label 2025-10-09 16:39:13 +03:00
Author
Owner

@stonith404 commented on GitHub:

I'm converting this to a discussion as this is probably not a bug but a configuration issue.

@stonith404 commented on GitHub: I'm converting this to a discussion as this is probably not a bug but a configuration issue.
Author
Owner

@kmendell commented on GitHub:

Did you follow the guide here? https://pocket-id.org/docs/client-examples/memos

@kmendell commented on GitHub: Did you follow the guide here? https://pocket-id.org/docs/client-examples/memos
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-2#314