glitch-soc / mastodon

A glitchy but lovable microblogging server

Home Page:https://glitch-soc.github.io/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OIDC - Wrong field being mapped as username even though OIDC_UID_FIELD is set

asyncmeow opened this issue · comments

Steps to reproduce the problem

  1. Install a new glitch-soc instance
  2. Configure OIDC against a default Keycloak client (ie. default scopes/claims on the Keycloak side)
  3. Set OIDC_UID_FIELD=username

Expected behaviour

The username field should be mapped to the Mastodon username

Actual behaviour

The sub (subject) field was mapped to the Mastodon username, with hyphens removed (sub is a uuid)

Detailed description

When authenticating via OIDC to Mastodon, the newly-created user is created using the sub field of the userinfo, instead of the username field as is configured.

Mastodon instance

fedi.rrr.sh

Mastodon version

v4.3.0-nightly.2024-02-03+glitch

Browser name and version

Firefox 121.0.1

Operating system

macOS Ventura 13.4.1

Technical details

No response

Can you report this upstream? There should be no difference in the way glitch-soc handles this, and I am unable to find the issue for now.