OIDC (Pocket-ID) Integration Issue

I have followed the following documentation to integrate Vikunja with Pocket-ID:

When a user logs in to Vikunja for the first time via Pocket-ID, they get redirected to Pocket-ID and get a message saying “Vikunja wants to access the following information” and lists Email and Profile. If they then click “Sign In” they get redirected back to Vikunja, but get an error saying:

”No email address was provided by the OpenID provider.Please make sure the openid provider publicly provides an email address for your account.”

The accounts trying to log in definitely have email addresses configured (and verified).

I have configured:

VIKUNJA_AUTH_OPENID_PROVIDERS_POCKETID_SCOPE=“openid profile email”

Other OIDC client applications using the same scope can be signed in to successfully by the same users.

Does anyone have any idea what the issue might be?

So I spent hours trying to get this to work, finally gave up and posted on this forum, and then resolve the issue 15 minutes later :grinning_face:

I was using environment variables in Docker Compose to configure OIDC. Some other forum posts have stated this isn’t the most reliable way of doing it. I put the exact same configuration I had with environment variables into a config.yml file and everything then worked straight away.

Before making the change I noticed an error in the logs for Vikunja saying “forceuserinfo is not a boolean for provider PocketID, value: true”.

I had “VIKUNJA_AUTH_OPENID_PROVIDERS_POCKETID_FORCEUSERINFO=true” set in Docker Compose. I don’t know why the Boolean value wasn’t being recognised. Other Boolean values, like “VIKUNJA_AUTH_OPENID_ENABLED=true”, were working fine. So this may have had something to do with it.

Either way, configuring OIDC via the config.yml file works.