🐛 Bug Report: "name" is not included in user info #497

Closed
opened 2025-10-09 16:50:27 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @John-K on GitHub.

Reproduction steps

When I try to use an application that looks for "name" instead of "given_name" and "family_name" in the profile claim, it errors out.

Expected behavior

"name" should be constructed from "given_name" and "family_name" and included in the profile claim

Actual Behavior

Application errors out that no username was returned. This is a slight bug on the application side, but "name" should be included in any case.

Originally created by @John-K on GitHub. ### Reproduction steps When I try to use an application that looks for "name" instead of "given_name" and "family_name" in the profile claim, it errors out. ### Expected behavior "name" should be constructed from "given_name" and "family_name" and included in the profile claim ### Actual Behavior Application errors out that no username was returned. This is a slight bug on the application side, but "name" should be included in any case.
OVERLORD added the bug label 2025-10-09 16:50:27 +03:00
Author
Owner

@stonith404 commented on GitHub:

@danielgraycode You probably forgot to add those claims in Cloudflare:
image

The following claims are supported: "sub", "given_name", "family_name", "name", "email", "preferred_username"

@stonith404 commented on GitHub: @danielgraycode You probably forgot to add those claims in Cloudflare: ![image](https://github.com/user-attachments/assets/10ce429c-40b6-452d-b6b6-d210b20ae8c2) The following claims are supported: `"sub", "given_name", "family_name", "name", "email", "preferred_username"`
Author
Owner

@danielgraycode commented on GitHub:

I have updated to v0.4.1 and when using PocketID with Cloudflare Zero Trust, I am still not seeing the name being passed through to user email. Here's an idea of the fields that cloudflare gets with PocketID vs other providers (fields only, content removed- the fields are what's important here)

With PocketID:

{
  "id": "",
  "email": "",
  "idp": { "id": "", "type": "" },
  "geo": { "country": "" },
  "user_uuid": "",
  "account_id": "",
  "iat": 0,
  "ip": "",
  "auth_status": "",
  "common_name": "",
  "is_warp": false,
  "is_gateway": false,
  "version": 0,
  "device_sessions": {},
  "custom": {}
}

Compared to when using another identity provider:

{
  "id": "",
  "email": "",
  "name": "",
  "givenName": "",
  "surName": "",
  "idp": { "id": "", "type": "" },
  "geo": { "country": "" },
  "user_uuid": "",
  "account_id": "",
  "iat": 0,
  "ip": "",
  "auth_status": "",
  "common_name": "",
  "is_warp": false,
  "is_gateway": false,
  "version": 0,
  "device_sessions": {},
  "custom": {}
}
@danielgraycode commented on GitHub: I have updated to v0.4.1 and when using PocketID with Cloudflare Zero Trust, I am still not seeing the name being passed through to user email. Here's an idea of the fields that cloudflare gets with PocketID vs other providers (fields only, content removed- the fields are what's important here) With PocketID: ``` { "id": "", "email": "", "idp": { "id": "", "type": "" }, "geo": { "country": "" }, "user_uuid": "", "account_id": "", "iat": 0, "ip": "", "auth_status": "", "common_name": "", "is_warp": false, "is_gateway": false, "version": 0, "device_sessions": {}, "custom": {} } ``` Compared to when using another identity provider: ``` { "id": "", "email": "", "name": "", "givenName": "", "surName": "", "idp": { "id": "", "type": "" }, "geo": { "country": "" }, "user_uuid": "", "account_id": "", "iat": 0, "ip": "", "auth_status": "", "common_name": "", "is_warp": false, "is_gateway": false, "version": 0, "device_sessions": {}, "custom": {} } ```
Author
Owner

@stonith404 commented on GitHub:

Thanks, I've added it in v0.4.1.

@stonith404 commented on GitHub: Thanks, I've added it in `v0.4.1`.
Author
Owner

@John-K commented on GitHub:

suggest fixing by adding "name": user.FirstName + " " + user.LastName, to 8ad632e6c1/backend/internal/service/oidc_service.go (L303)

@John-K commented on GitHub: suggest fixing by adding `"name": user.FirstName + " " + user.LastName,` to https://github.com/stonith404/pocket-id/blob/8ad632e6c1cfa1c7f99f3a283ce56c8e30ada1e0/backend/internal/service/oidc_service.go#L303
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#497