Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Nextcloud as custom oauth provider wasn't mapping data correctly #10090

Merged
merged 3 commits into from
Mar 15, 2018

Conversation

pierreozoux
Copy link
Contributor

This is the schema of the response (you can ask json instead of xml).

@RocketChat/core

@RocketChat RocketChat deleted a comment Mar 10, 2018
@geekgonecrazy geekgonecrazy added this to the 0.63.0 milestone Mar 11, 2018
@rodrigok rodrigok changed the title [FIX] Nextcloud oauth provider [FIX] Nextcloud as custom oauth provider wasn't mapping data correctly Mar 15, 2018
@rodrigok rodrigok merged commit a8c4ba1 into RocketChat:develop Mar 15, 2018
@pierreozoux pierreozoux deleted the patch-1 branch March 16, 2018 10:30
@rodrigok rodrigok mentioned this pull request Apr 4, 2018
@DeepDiver1975
Copy link

@pierreozoux why did you choose to not stick to the OpenID specification and forced the owncloud/nextcloud own specficiation upon rocket chat?

Adding the necessary endopoint to owncloud/nextcloud is rather easy - feel free to have a look at owncloud/oauth2#115

@pierreozoux
Copy link
Contributor Author

@DeepDiver1975 thanks for the hint.

To be honest, I'm not a developer, I'm more on developing hosting infrastructure, so I'm always looking to develop the least.

And when I code, I prefer js :)

On GitLab or Discourse, it was easy to configure, so I though, I'd do the little correction for Rocket and it is all I need for now.

I still think that this should be configurable on Rocket too, (the way it is configurable on GitLab), but this is another topic.

@karakayasemi
Copy link
Contributor

IMHO, in terms of clean code, stick to a common specification and forcing it is much better than defining exceptions for different projects.

@maherbm
Copy link

maherbm commented Jan 28, 2019

Hi @pierreozoux,

It seems to me that the mapping you did does not work for some reason. It seems your code never get executed.

I have the latest snap installation (0.73.2) and i double checked and your update is there. When using NextCloud as an oauth provider, I do not get the ocs.data.displayname copied to the newly created RocketChat account.

If i point the username field in the Custom OAuth configuration panel to "ocs.data.id", the displayname is ignored. I thought maybe your code will be executed when I leave the username field empty empty. However, in that situation I found out, RocketChat asks new users to define a username and still ignores the displayname from NextCloud (and appearently it also ignores then the id too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants