Closed marcantoinegodde closed 2 years ago
I can add something like "display name claim" option field, but it does not fit your needs anyway.
It would be really nice if you could do this. I could probably ask a team in my company to create a fullName field equal to firstName + lastName. Many thanks.
I could probably ask a team in my company to create a fullName field equal to firstName + lastName. Many thanks.
If you could do this, you can also ask about "username" field. I fill display name with it. I try to fulfill anyone, but it not possible as you know )
https://github.com/zorn-v/nextcloud-social-login/blob/master/lib/Provider/CustomOAuth2.php
I agree but they won't allow to put firstName + lastName in a field called username. And as you said, if you want to fulfill most of the users, it would be very interesting to give the possibility to adapt the plugin to many OAuth configurations.
it would be very interesting to give the possibility to adapt the plugin to many OAuth configurations.
Any suggestion how to do it without break some ? Maybe introduce TWIG template engine just for concatenate 2 fields ? https://github.com/pulsejet/nextcloud-oidc-login/pull/71
It is not to be done on nextcloud side as I suppose.
This wasn't necessary. I finally managed to find the time to finish this. I opened a pull request, I'll let you check it out. ;)
I already compiled the frontend code.
Hello,
In my company, the OAuth 2 (which is not compatible with OpenID) gives these fields:
To display the correct name on Nextcloud, I could do a quick fix by editing the line 39 of
nextcloud-social-login/lib/Provider/CustomOAuth2.php
($response->displayName = $response->username ?? null;
) like a concatenation with a space offirstName
andlastName
.It's not very clean though. Do you think you could make your code more flexible with configuration ?
Thanks, Hexomédia