Lissy93 / dashy

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
https://dashy.to
MIT License
18.07k stars 1.36k forks source link

[FEATURE_REQUEST] OIDC username, groups and roles selection #1685

Open Hazzard17h opened 2 months ago

Hazzard17h commented 2 months ago

Is your feature request related to a problem? If so, please describe.

I was able to configure OIDC with GitLab (self hosted) using:

appConfig:
  auth:
    enableOidc: true
    oidc:
      clientId: ***
      endpoint: https://gitlab.***.com/
      scope: openid profile email

But I'm not able to use show/hideForKeycloakUsers because keycloakInfo in localStorage is not filled with GitLab groups, I guess because they are saved in the OIDC profile as groups_direct. Also username is filled using OIDC profile preferred_username, but maybe could be preferable to use email or nickname or sub.

Describe the solution you'd like

It could be very useful to be able to select from OIDC profile which fields to use to fill Dashy logged in user username, groups and roles. Possible configurations could be:

appConfig.auth.oidc.profileFields (optional)

Field Type Required Description
username string Optional The OIDC profile field to use to fill Dashy username (default: preferred_username)
groups string Optional The OIDC profile field to use to fill Dashy groups (default: groups)
roles string Optional The OIDC profile field to use to fill Dashy roles (default: roles)

Priority

Medium (Would be very useful)

Is this something you would be keen to implement

Maybe