Open jasonpincin opened 3 months ago
This relates to a feature request captured here: https://github.com/BookStackApp/BookStack/issues/4271
Thanks for offering this @jasonpincin, and sorry for my delayed response. The code here looks good, but there's a few things I think we'd need to consider, or some changes to the code to avoid complexity.
$picture
through the whole default registration process. Instead I think it would be better if this can the be left as-is, and and extra assignToUserFromUrl
method be added to the UserAvatars
class, much like this method which is what we use for LDAP avatar images. The UserAvatars
class can then be injected into the OidcService
and used directly.Would you be happy to take changes following the above? Otherwise I can continue this if needed so don't stress on it. Just let me know if anything is unclear or if you need extra guidance on anything.
This is a naive first attempt at adding support for OIDC pictures. It works (for me) which is about all I can say about it.
Tossing it up there in case it's useful, or for feedback. Happy to develop the PR further if there's broader interest in the feature. If I were to develop it further, I'd be curious if there's thoughts on better ways of plumbing the picture path through, and if there's any mechanism for refreshing the user's avatar that would need to be updated. It wasn't immediately evident to me that this existed.