user_oidc icon indicating copy to clipboard operation
user_oidc copied to clipboard

Avatar not set when logging in

Open Ma27 opened this issue 1 year ago • 1 comments

So, I'm not sure if I'm misunderstanding something, but

  • My OIDC provider has the claim avatar with the attribute avatar being the URL to the avatar of the user that just logged in.
  • I added the claim to the scopes in user_oidc's admin panel
  • and set Avatar mapping to avatar in Extra attributes mapping.

In fact, oc_accounts shows me this:

[...] avatar":{"value":"https:\/\/host\/media\/user-avatars\/foobar.jpeg","scope":"v2-local","verified":"1"} [...]

First of all, I didn't expect the \/ escape here, but that's not what I'm up to. My problem is that the user still has the default avatar set after logging in with this configuration. I would've expected that said user has an avatar supplied from the OIDC provider now.

Am I misunderstanding something? Or is this an issue? I dug a little bit into the codebase already, so I may be able to provide a patch, but I wanted to make sure first that I'm not holding it wrong.

Nextcloud: 28.0.4 PHP: 8.2 user_oidc: 5.0.2

Ma27 avatar Apr 13 '24 15:04 Ma27

Thanks for reporting this. Avatar support cannot work in its current state.

I think supporting URLs and base64 content would be enough. What do you think?

We will properly implement it soon. I'll keep you updated.

julien-nc avatar Apr 17 '24 13:04 julien-nc