postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

Pocket-id Error when attempting login. 'Token Request Failed... invalid code verifier'

Open patach opened this issue 1 month ago • 0 comments

📜 Description

I'm having some problems with using authentication with pocket-id on a Selfhosted instance of Postiz.

After following both the steps of the postiz documentation and pocket id's own: https://pocket-id.org/docs/client-examples/postiz

Logging with pocket id allow me to input my passkey, but when it returns, it will just get stuck on a loading screen on postiz.site.com/auth and be stuck there.

Error message:

0|backend   | [Nest] 318  - 12/11/2025, 1:54:20 AM   ERROR [ExceptionsHandler] Token request failed: {"error":"Invalid code verifier"}

0|backend   | Error: Token request failed: {"error":"Invalid code verifier"}

0|backend   |     at OauthProvider.getToken (/app/apps/backend/dist/apps/backend/src/services/auth/providers/oauth.provider.js:55:19)

0|backend   |     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

0|backend   |     at async AuthService.checkExists (/app/apps/backend/dist/apps/backend/src/services/auth/auth.service.js:140:23)

0|backend   |     at async AuthController.oauthExists (/app/apps/backend/dist/apps/backend/src/api/routes/auth.controller.js:166:32)

My docker compose for oauth:

      NEXT_PUBLIC_POSTIZ_OAUTH_DISPLAY_NAME: "Pocket-ID"
      NEXT_PUBLIC_POSTIZ_OAUTH_LOGO_URL: "https://raw.githubusercontent.com/pocket-id/pocket-id/refs/heads/main/frontend/static/img/static-logo.svg"
      POSTIZ_GENERIC_OAUTH: "true"
      POSTIZ_OAUTH_URL: "https://pocketid-url.com"
      POSTIZ_OAUTH_AUTH_URL: "https://pocketid-url/authorize"
      POSTIZ_OAUTH_TOKEN_URL: "https://pocketid-url/api/oidc/token"
      POSTIZ_OAUTH_USERINFO_URL: "https://pocketid-url/api/oidc/userinfo"
      POSTIZ_OAUTH_CLIENT_ID: "***"
      POSTIZ_OAUTH_CLIENT_SECRET: "***"

👟 Reproduction steps

  1. Create Pocket-id service and connect Pocket-id to Postiz
  2. Log in through Pocket-id
  3. Input passkey
  4. Get stuck on loading screen

👍 Expected behavior

I should be able to login to postiz through the pocket-id

👎 Actual Behavior with Screenshots

Image Image Image

💻 Operating system

Linux

🤖 Node Version

2.10.1

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

Are you willing to submit PR?

None

patach avatar Dec 11 '25 17:12 patach