You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Gitlab doesn't return the username with the ID token: "Only the sub and sub_legacy claims are included in the ID token, all other claims are available from the /oauth/userinfo endpoint used by OIDC clients.", see its documentation.
Synapse can use the userinfo endpoint to query that information but it doesn't do so when the "openid" scope is used (which is required to permit access to the userinfo endpoint in Gitlab). In fact, a comment in the code already considers making this configurable. This patch does that. This makes it work for me. Is this the correct way to patch that? Should I open a PR with the patch?
Steps to reproduce
Configure OpenID Connect with Gitlab, i.e. Synapse is the relying party, Gitlab is the Authorization Server.
I have used this mapping for the username: localpart_template: "{{ user.nickname }}"
Try to login.
Login fails because localpart is empty.
Version information
I'm running 1.14.0 (on NixOS) but the relevant code is the same in the develop branch.