SSO (rocketchat) required to grant access to their Nextcloud account on each login
Steps to reproduce
- Login to Rocket Chat via Nextcloud using OAuth
- Grant Access
- Logout of Rocket Chat
- 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
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. ).
No information how to authenticate nextcloud users on rocket chat seamlessly ?
Seeing the same issue. Nextcloud creates a new "app-password" for every login.
@ChristophWurst @rullzer for app token
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.
Since #13182 was closed, it would be awesome if this remained open.
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.
AFAIK still an issue with Nextcloud 19.
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.
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.
The issue still persists...
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.
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:
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.
Yes, \OC\Authentication\Token\DefaultTokenCleanupJob takes care of old session tokens.
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?
Let's put the cron problem/questions on https://help.nextcloud.com ;)
@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?
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.
Do you know where this attribute remember=1 is set and why?
At \OC\Authentication\Login\CreateSessionTokenCommand::process