server icon indicating copy to clipboard operation
server copied to clipboard

SSO (rocketchat) required to grant access to their Nextcloud account on each login

Open mbh-dev opened this issue 8 years ago • 23 comments

Steps to reproduce

  1. Login to Rocket Chat via Nextcloud using OAuth
  2. Grant Access
  3. Logout of Rocket Chat
  4. Have to regrant access on logging into Rocket Chat via Nextcloud OAuth

Expected behaviour

User should only be required to grant access to their Nextcloud account once

Actual behaviour

Each time a user logs into Rocket chat they are required to grant access to their Nextcloud account each time

Server configuration

Operating system: Ubuntu 18.04

Web server: Apache

Database: MySql

PHP version: 7.2

Nextcloud version: (see Nextcloud admin page) 14.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: Source

Login as admin user into your Nextcloud and access 
No Errors have been found

Operating system:** Windows 10

mbh-dev avatar Nov 09 '18 13:11 mbh-dev

GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/8330 (Nextcloud Documentation Issue), https://github.com/nextcloud/server/issues/9023 (Connect Rocket.Chat with Nextcloud in order to build a strong communication platform), https://github.com/nextcloud/server/issues/6718 (Nextcloud 12 Upgrade and Collation Issues), https://github.com/nextcloud/server/issues/10941 (Nextcloud customiztion), and https://github.com/nextcloud/server/issues/11202 (Nextcloud 14 Upgrade issue. ).

nextcloud-bot avatar Nov 09 '18 13:11 nextcloud-bot

No information how to authenticate nextcloud users on rocket chat seamlessly ?

Elfanar avatar Jan 30 '19 10:01 Elfanar

Seeing the same issue. Nextcloud creates a new "app-password" for every login.

cjhille avatar Feb 10 '20 02:02 cjhille

@ChristophWurst @rullzer for app token

skjnldsv avatar Apr 10 '20 08:04 skjnldsv

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar May 10 '20 08:05 ghost

Since #13182 was closed, it would be awesome if this remained open.

cjhille avatar May 10 '20 09:05 cjhille

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Jun 09 '20 10:06 ghost

AFAIK still an issue with Nextcloud 19.

cjhille avatar Jun 09 '20 14:06 cjhille

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Jul 09 '20 14:07 ghost

So this then most likely is an issue in rocket chat not reusing the token... other oauth providers work just fine. Let me close this unless somebody can provide more info.

rullzer avatar Jul 09 '20 17:07 rullzer

The issue still persists...

derspotter avatar Jan 14 '21 09:01 derspotter

I can confirm that this issue still exists. I have a plain clear installation, nothing special. Only few users. This error is very annoying! I do not understand why for every login session with the same login name a new entry is created instead of updating the existing session entries? Please reopen this bug and fix it.

AlfredoCubitos avatar Sep 15 '21 07:09 AlfredoCubitos

I'm happy to reopen. But Nextcloud is a community project.

reopen this bug and fix it

We're happy to help you with your fixes and getting them merged. Please feel free to dig into the code and fix the issue yourself if you can or hire someone who can do this for you :v:

ChristophWurst avatar Sep 15 '21 09:09 ChristophWurst

I have made some tests, and I came to the conclusion that this may not really a server problem, but rather a desktop/mobile client problem. @ChristophWurst : do you know if the cron.php cleans up also the oc_authtoken table? If this is so, this could also be cronjob problem.

AlfredoCubitos avatar Sep 15 '21 14:09 AlfredoCubitos

Yes, \OC\Authentication\Token\DefaultTokenCleanupJob takes care of old session tokens.

ChristophWurst avatar Sep 20 '21 12:09 ChristophWurst

Ok, it seems that the cronjob does not work correctly. I made several changes to cronjob option but always I get an error message like this Some jobs didn’t execute since x days ago. So I called cron.php manually and it returns success but the old sessions in the oc_authtoken were not deleted.

Know I am at the end with my wisdom. I do not know where to look for the error. @ChristophWurst : do you have any idea?

AlfredoCubitos avatar Sep 20 '21 17:09 AlfredoCubitos

Let's put the cron problem/questions on https://help.nextcloud.com ;)

ChristophWurst avatar Sep 20 '21 17:09 ChristophWurst

@ChristophWurst I think you can close this issue here. I found out that entries with set remember = 1 are expiring after 15 days, this may lead to huge entries in oc_authtoken on sites with heavy traffic.

Do you know where this attribute remember=1 is set and why?

AlfredoCubitos avatar Oct 02 '21 12:10 AlfredoCubitos

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Nov 01 '21 12:11 ghost

Do you know where this attribute remember=1 is set and why?

At \OC\Authentication\Login\CreateSessionTokenCommand::process

ChristophWurst avatar Nov 02 '21 09:11 ChristophWurst