nextcloud / registration

User registration app for Nextcloud
GNU Affero General Public License v3.0
137 stars 78 forks source link

"The token is invalid" on submitting user name #263

Closed davidandres-911 closed 3 years ago

davidandres-911 commented 3 years ago

Hi! I hope that this is the right place to ask this question: I'm running an NC 20 installation (intern.ojhs.de). When users want to complete the registration, they receive the mail with the code, when they enter it, they can choose a username and passwort. So far, so good. But when clicking on "register" the are confronted with the error message "Invalid token" and nothing happens. But actually the registration process is complete - when they go back to the login form and enter their data, they can login successfully. Any hints about what problem might lead to that error message and how to change it?

Any help on this would be very welcome!

Thanks in advance, David

### Steps to reproduce 1. register on intern.ojhs.de 2. click on approval link 3. register with desired username -> error message invalid token appears ### Expected behaviour Tell us what should happen registration should be completet ### Actual behaviour Tell us what happens instead error message ### Server configuration **Operating system**: **Web server:** **Database:** mysql, 5.7.28 **PHP version:** 7.4.10 **Nextcloud version:** (see Nextcloud admin page) 20.0.0.4 **Updated from an older Nextcloud/ownCloud or fresh install:** fresh install with version 20 **Where did you install Nextcloud from:** **Signing status:**
Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. No errors have been found. ```
**List of activated apps:**
App list Accessability Activity Announcement center Brute-force settings Collabora online Collabora Online - Built-in Code Server collaborative Tags Comments community document server Contacts Interaction Custom CSS Deck Deleted files External storage support Federation File sharing Files automated tagging Full text search - Files Group folders LDAP user and group backend Log reader Monitoring Nextbackup Nextcloud announcements Notifications Password policy PDF viewer Privacy Recommendations Registration (0.6.0.) Right click Share by mail support Talk Text Theming Update notification Usage survey User status Versions Video Player Weather Status Whiteboard ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ```
**The content of config/config.php:**
Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here (Without the database password, passwordsalt and secret) ```
**Are you using external storage, if yes which one:** local/smb/sftp/... no **Are you using encryption:** yes/no no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ``` ### Client configuration **Browser:** various **Operating system:** windows and macos ### Logs #### Web server error log
Web server error log ``` Insert your webserver log here ```
#### Nextcloud log (data/nextcloud.log)
Nextcloud log ``` Insert your Nextcloud log here ```e registered |  
#### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
Mavrag commented 3 years ago

Having the same problem. The user is actually added and can login if you go back to login page. But it just tells him The token is invalid.

skeal commented 3 years ago

Same here in a fresh 20 install. Sadly we are moving curently to another auth mechanism and so every User gets this error now.

davidandres-911 commented 3 years ago

Unfortunately the problem still persists - has anyone found a workaround?

nickvergessen commented 3 years ago

So actually this is a bug site-effecting from the activity app and should be fixed with https://github.com/nextcloud/activity/pull/541/files

can you confirm this?

nickvergessen commented 3 years ago

Also the bug can only be reproduced with:

  1. An admin that has push notifications configured
  2. A default group for new users is selected

right?

davidandres-911 commented 3 years ago

Thanks for your reply!

So actually this is a bug site-effecting from the activity app and should be fixed with https://github.com/nextcloud/activity/pull/541/files can you confirm this?

Sorry, I don't understand the first post, can you explain that more in detail?

Also the bug can only be reproduced with:

An admin that has push notifications configured A default group for new users is selected

right?

yes, it helps to either deactivate the notifications app, the activity app or change the default group.

unfortunately I realized that when deactivating the activity app, every user (and not only admins) get a notification when a new user registers. I'm pretty sure that this behaviour wasn't that way before installing it.

nickvergessen commented 3 years ago

Closing as per above as this is a bug in the activity app which was solved in the latest maintenance releases