Skip to content

Pocket-ID OIDC not working correctly - 404 #877

@ocr99

Description

@ocr99

📜 Description

Hi,

I'm trying to set up Postiz with a custom OpenID Connect (OIDC) provider (Pocket‑ID), using the generic OAuth configuration. Everything loads fine, and the login button appears as expected. However, when clicking on the login button, the browser is redirected to a 404 error.

👟 Reproduction steps

After some debugging, I noticed that Postiz tries to redirect to: https://id.domain.com/authorize/?client_id=...

As you can see, there's an extra slash before the query string (/?client_id=...), which causes the 404.

If I manually fix the URL by removing that quote and slash, like this: https://id.domain.com/authorize?client_id=...

Then the authorization request goes through and I can log in to Pocket-ID, but after being redirected back to Postiz, the app gets stuck in a loop here: https://postiz.domain.com/auth?code=.


My environment variables

      POSTIZ_GENERIC_OAUTH: "true"
      NEXT_PUBLIC_POSTIZ_OAUTH_DISPLAY_NAME: "Pocket ID"
      NEXT_PUBLIC_POSTIZ_OAUTH_LOGO_URL: "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/pocket-id.webp"
      POSTIZ_OAUTH_URL: "https://id.domain.com"      
      POSTIZ_OAUTH_AUTH_URL: "https://id.domain.com/authorize"
      POSTIZ_OAUTH_TOKEN_URL: "https://id.domain.com/token"
      POSTIZ_OAUTH_USERINFO_URL: "https://id.domain.com/userinfo"
      POSTIZ_OAUTH_CLIENT_ID: "CLIENT_ID"
      POSTIZ_OAUTH_CLIENT_SECRET: "SECRET"

Thanks!

👍 Expected behavior

It should redirect to Pocket-ID and log in to the app

👎 Actual Behavior with Screenshots

When I log in to Pocket-ID and redirects me to Postiz again it gets stuck here:

Image

💻 Operating system

Linux

🤖 Node Version

v20.18.1

📃 Provide any additional context for the Bug.

No response

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

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions