Looks like user info is read from the auth response here https://github.com/mastodon/mastodon/blob/a6ed6845c9cab3b314ce6434b851cc507a71ee62/app/models/concerns/omniauthable.rb#L66
Mastodon as three pre-defined roles, Moderator, Admin, Owner: https://github.com/mastodon/mastodon/blob/44b2ee3485ba0845e5910cefcb4b1e2f84f34470/config/roles.yml
Although it looks like we will have to extract roles from extra instead of user info? https://github.com/omniauth/omniauth_openid_connect/blob/ce7840c5e2d4eb2382fade9de9ba1a144c38904f/lib/omniauth/strategies/openid_connect.rb#L72
Mastodon does not support roles, so it is necessary to manipulate users outside of keycloak.
Looks like user info is read from the auth response here
a6ed6845c9/app/models/concerns/omniauthable.rb (L66)
Mastodon as three pre-defined roles, Moderator, Admin, Owner:
44b2ee3485/config/roles.yml
Although it looks like we will have to extract roles from extra instead of user info?
ce7840c5e2/lib/omniauth/strategies/openid_connect.rb (L72)
Preliminary pull request https://github.com/mastodon/mastodon/pull/21787