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

[NEW] NextCloud auth #2109

Open
loxK opened this issue May 12, 2020 · 14 comments
Open

[NEW] NextCloud auth #2109

loxK opened this issue May 12, 2020 · 14 comments
Assignees

Comments

@loxK
Copy link

loxK commented May 12, 2020

Describe the bug

In web client (mobile and desktop) I have the button but not in the android app

Screenshots

Web login:
image

Android:
signal-attachment-2020-05-12-170829

Devices and Versions

Your Rocket.Chat.Android version: 4.6.4
Your Rocket.Chat Server version: 3.1.1 (stable 3.x snap channel)

Mobile device model and OS version: OnePlus 6T Android 10

@loxK loxK changed the title Not showing nextcloud auth button Not showing NextCloud auth button May 12, 2020
@diegolmello
Copy link
Member

This repo is deprecated: https://github.com/RocketChat/Rocket.Chat.Android#important---please-read-this-first
Transferring to new one.

@diegolmello diegolmello transferred this issue from RocketChat/Rocket.Chat.Android May 12, 2020
@diegolmello diegolmello reopened this May 12, 2020
@diegolmello
Copy link
Member

diegolmello commented May 12, 2020

It doesn't work on iOS as well.
Nextcloud auth is not implemented yet.
Can you ping me on https://open.rocket.chat?
I'm @diego.mello.
Let's implement this asap.
Thanks.

@yodatak
Copy link

yodatak commented May 15, 2020

It could be very cool to have this fonctionality !

@loxK
Copy link
Author

loxK commented May 31, 2020

I had to go forward and Nextcloud can be configured as Custom OAuth, which is supported by the App.

  1. Firstly create a Custom OAuth in Rocket Chat server settings, copy the Callback URL
  2. Create a new OAuth Client in Nextcloid Security settings, use the Callback URL.
  3. Copy Id and Secret from Nextcloud
  4. In Rocket Chat Server configure the Custom OAuth provider as follows:
  • Enable: checked
  • URL: [your nexcloud base url]
  • Token Path: /apps/oauth2/api/v1/token
  • Token Sent Via: Header
  • Identity Token Sent Via: Same as "Token Sent Via"
  • Identity Path: /ocs/v2.php/cloud/user?format=json
  • Authorize Path: /apps/oauth2/authorize
  • Scope: openid
  • Param Name for access token: access_token
  • Id:  [paste from NextCloud OAuth client configuration]
  • Secret: [paste from NextCloud OAuth client configuration]
  • Login Style: [make your choice]
  • Button Text: [your choice]
  • Button Text Color: [your choice]
  • Button Color: [your choice]
  • Username field: ocs.data.id
  • Email field: ocs.data.email
  • Name field: ocs.data.display-name
  • Avatar field: [leave empty]
  • Roles/Groups field name: ocs.data.groups
  • Merge Roles from SSO: uncheck
  • Merge users: check
  • Show Button on Login Page: check

@yodatak
Copy link

yodatak commented May 31, 2020

Thanks a lot i use your solution @loxK !

@yodatak
Copy link

yodatak commented May 31, 2020

I try to get the merge roles fonctionality work but it don't you have any idea how to do it ?

@yodatak
Copy link

yodatak commented May 31, 2020

I can't find the ocs.data.groups

@loxK
Copy link
Author

loxK commented May 31, 2020

I don't use that feature. I tried and it made my account to loose the admin role in Rocket Chat. I didn't dig further.

@yodatak
Copy link

yodatak commented May 31, 2020

I don't use that feature. I tried and it made my account to loose the admin role in Rocket Chat. I didn't dig further.

Same for me 👍

@djorkaeffalexandre
Copy link
Collaborator

Nice workaround @loxK! I'll use this to develop the right way and do this working, probably at the next week!
Thanks! 😃

@darius1810
Copy link

Hello @djorkaeffalexandre, is there something new ?

@czadikem
Copy link

czadikem commented Sep 6, 2022

Yeah has this been implemented yet? Or is it in the works?

@linusgke
Copy link

Any updates on this? @loxK's workaround didn't work for me!

@3ronco
Copy link

3ronco commented Feb 22, 2024

All oauth config fields for Nextcloud filled appropiately in RocketChat server settings under https://.../admin/settings/OAuth

Rocket.Chat Version: 6.6.0
     NodeJS Version: 14.21.3 - x64
    MongoDB Version: 5.0.24
        Commit Hash: 92a307ec3d

with Android App Version 4.46.1.57002

No OAuth Button for login in the mobile app only and the following log message when trying to connect:

{"level":40,"time":"...","pid":9,"hostname":"...","name":"DeprecationWarning","section":"API","msg":"The parameter \"query\" in the endpoint \"/api/v1/settings.public\" is deprecated and will be removed on version 7.0.0"}

Login from Web Browser works fine.

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

No branches or pull requests

8 participants