[Feature] OIDC DisplayName and ProfilePicURL support #727

Closed
opened 2025-12-29 02:23:00 +01:00 by adam · 0 comments
Owner

Originally created by @adipierro on GitHub (Jun 17, 2024).

Use case

Mostly improves appearance, but probably also usability for users with multiple tailnets.

Description

DisplayName, ProfilePicURL and Email (optional) are used and pushed to clients if user is logged in from OIDC

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

After OIDC login, if ProfilePicUrl and/or DisplayName is provided, it is set in DB in case it differs from saved state, then pushed to clients.

Currently DisplayName on macOS and Windows is only displayed in IPN settings, while LoginName (username@domain.tld) is used as primary identifier for Fast User Switching UI.

LoginName in UserProfile in tailcfg is expected to be an email in SaaS, which is not the case how it works in Headscale now, if username is stripped from email domain after login, it is just a username. However, if username email domain stripping is enabled, MagicDNS is not working correctly ('@' appears in FQDN), but I should probably create another issue for this.

I have implemented and tested experimental support for this (except Email) in my fork, but I don't have good programming skills, and probably might need help with design doc, as I'm sure my implementation is not ideal.

Draft PR is here https://github.com/juanfont/headscale/pull/1981.

macOS Windows
macOS Windows
Originally created by @adipierro on GitHub (Jun 17, 2024). ### Use case Mostly improves appearance, but probably also usability for users with multiple tailnets. ### Description `DisplayName`, `ProfilePicURL` and `Email` (optional) are used and pushed to clients if user is logged in from OIDC ### Contribution - [X] I can write the design doc for this feature - [X] I can contribute this feature ### How can it be implemented? After OIDC login, if ProfilePicUrl and/or DisplayName is provided, it is set in DB in case it differs from saved state, then pushed to clients. Currently `DisplayName` on macOS and Windows is only displayed in IPN settings, while `LoginName` (username@domain.tld) is used as primary identifier for Fast User Switching UI. `LoginName` in `UserProfile` in `tailcfg` is expected to be an email in SaaS, which is not the case how it works in Headscale now, if username is stripped from email domain after login, it is just a username. However, if username email domain stripping is enabled, MagicDNS is not working correctly ('@' appears in FQDN), but I should probably create another issue for this. I have implemented and tested experimental support for this (except `Email`) in my [fork](https://github.com/adipierro/headscale/tree/feat-oidc), but I don't have good programming skills, and probably might need help with design doc, as I'm sure my implementation is not ideal. Draft PR is here https://github.com/juanfont/headscale/pull/1981. | macOS | Windows | |--------|--------| | <img width="356" alt="macOS" src="https://github.com/juanfont/headscale/assets/80180243/39ac0722-ef9f-41da-a0c6-ba6f8508c82b"> | <img width="294" alt="Windows" src="https://github.com/juanfont/headscale/assets/80180243/46f57d7f-5396-47bb-9ef3-8cad83bbefec"> |
adam added the enhancementOIDC labels 2025-12-29 02:23:00 +01:00
adam closed this issue 2025-12-29 02:23:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#727