Invite link shows Invalid or expired invite token if Registration Form is in disabled state.
But after refresh (F5 in browser or CTRL+R in Electron) user gets in private chat.
Step 5 from Steps to reproduce is error and users don't need it


I20200312-05:22:24.382(0) API โ debug POST: /api/v1/validateInviteToken
I20200312-05:22:24.386(0) API โ debug Success { statusCode: 200, body: { valid: true, success: true } }
I20200312-05:22:24.396(0) API โ debug POST: /api/v1/useInviteToken
I20200312-05:22:24.408(0) Meteor โ method stream -> userId: null, arguments: ["notify-user","gYFnyDxfwdDom9jeR/userData",{"0":{"diff":{"_updatedAt":"2020-03-12T05:22:24.401Z","inviteToken":"2Eg3Ne"},"type":"updated"}}]
I20200312-05:22:24.409(0) Meteor โ method stream -> userId: null, arguments: ["notify-user","gYFnyDxfwdDom9jeR/userData",{"0":{"diff":{"_updatedAt":"2020-03-12T05:22:24.401Z","inviteToken":"2Eg3Ne"},"type":"updated"}}]
I20200312-05:22:24.419(0) API โ debug Success { statusCode: 200, body: { room: { rid: 'FPywz6abqTBQzp5zZ', prid: undefined, fname: 'test-invite5', name: 'test-invite5', t: 'p' }, success: true } }
I20200312-05:22:24.421(0) Integrations โ Outgoing WebHook.debug Execute Trigger: roomJoined
I20200312-05:22:24.422(0) Integrations โ Outgoing WebHook.debug Got the event arguments for the event: roomJoined { event: 'roomJoined', user: { _id: 'gYFnyDxfwdDom9jeR', createdAt: 2019-12-13T06:00:11.733Z, services: { ldap: [Object], keycloak: [Object], resume: [Object] }, username: 'karlanaat01', emails: [ [Object] ], type: 'user', status: 'online', active: true, _updatedAt: 2020-03-12T05:22:19.324Z, roles: [ 'user' ], name: '(Test1)', customFields: { Title: '', Department: '', l: '' }, ldap: true, lastLogin: 2020-03-12T05:22:19.298Z, statusConnection: 'online', utcOffset: 3, e2e: { private_key: '{"$binary":"O/fpY5CBCDzcF2m1cNSpKe0wVNMV2QpRbuUuxo2Wk7kGNFXzjdVmY9BHLxEOWP8RL3OYod6XX47AClzR+nImnF5A49ma3LS9xCagoA8HyDaUNSRXk3JW9V03bLeWM+E93LIiyJBY7isjo5RJOZU3zu0pKUePCtaJtfj3n2m5ziDV5gmrEV9B+n7BDMYzbznrAak4IZrcWlpnxEjJSt8mqNFwLx7aCGAdCe2TTL+AHvgkeRB7pI5XXpbwJrorL0luotWn2C931nxXLE4dowbRHnJlRCFwXImhz9pU5dSWt2+FtMWd41WHz2zp1a3AzsCRitVhw14k2QHxLnj/9fTtxeC9p1+wLhQOjjAj8ZcP9wNRD1GT4HXkEWdoYLDYAoWn4lt3k2dRlcrna7hfT9lKV+478C+dj5DxdQ0lzYt4mhzaE9a9NbktxUhapRunzspcBZ0evhWsd0kH2DBBlf/Ch7Kzon0GaGCXvX+Z7kkmrMvnKk8mJYK3wPKvk3TTSk4SklyLZSfWGQZx3HOKfPvt6WUeP2PEvU/ClIYKm9NFcm87LXadrT5W+ipWiQicvrknAjjRd7zRACESVmXQ1VDDOpSLHXDQvQOh1sMtp/r6ONtFdMJ0lWlSds6zNhc9MUt8fL8ksMJIX11HOjay8ZXuf69k091k6Nd2jVTpmlcaP86mxaefVqZC7QaOALKJbgmfbfFjOk99H67Op/MbIOQ645bNJ7yiQlXHyGQQMuvSvV09DVfYwPiW1lpX==skipped=="}', public_key: '{"alg":"RSA-OAEP-256","e":"AQAB","ext":true,"key_ops":["encrypt"],"kty":"RSA","n":"8HgRH_AxEXk0BCONT5_I1mqV7InbFxuaFA_Rz-uf-FRRxH4fcS7g3P_IN6cBjZWhtmg0L4nuW9rkCWeMgFjHqu7DyHIIG6Xrg7Cpr5mY-kCF_zZwwjDXO09uiVClaUAOm_WVOiPtzxq8wY9Psf81EYy0==skipped=="}' }, statusText: '', statusDefault: 'online', settings: { preferences: [Object] }, language: 'en', inviteToken: 'CPLcxd' }, room: { _id: 'FPywz6abqTBQzp5zZ', name: 'test-invite5', fname: 'test-invite5', t: 'p', msgs: 0, usersCount: 1, u: { _id: 'iodE4TwMg4i729GoH', username: 'karlanaa' }, customFields: {}, broadcast: false, encrypted: false, ts: 2020-03-12T05:22:03.529Z, ro: false, default: false, sysMes: true, _updatedAt: 2020-03-12T05:22:03.558Z } }
I20200312-05:22:24.423(0) Integrations โ Outgoing WebHook.debug Starting search for triggers for the room: FPywz6abqTBQzp5zZ
I20200312-05:22:24.423(0) Integrations โ Outgoing WebHook.debug Found 0 to iterate over and see if the match the event.
I20200312-05:22:24.446(0) Meteor โ method getRoomByTypeAndName -> userId: gYFnyDxfwdDom9jeR, arguments: ["p","test-invite5"]
I20200312-05:22:24.449(0) Meteor โ method canAccessRoom -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ","gYFnyDxfwdDom9jeR"]
I20200312-05:22:24.459(0) Meteor โ method loadHistory -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ",{},50,{}]
I20200312-05:22:24.460(0) Meteor โ method canAccessRoom -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ","gYFnyDxfwdDom9jeR"]
I20200312-05:22:24.466(0) Meteor โ method canAccessRoom -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ","gYFnyDxfwdDom9jeR",null]
I20200312-05:22:24.473(0) Meteor โ method getRoomRoles -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ"]
I20200312-05:22:25.019(0) Meteor โ method readMessages -> userId: gYFnyDxfwdDom9jeR, arguments: ["FPywz6abqTBQzp5zZ"]
We have Registration Form Disabled because out Rocket.Chat environment is LDAP-enabled and for now isolated for external users.
We plan to set Registration Form to Secret URL after that https://github.com/RocketChat/feature-requests/issues/295 feature will be implemented, i.e when new registered users will be associated with custom role, that restricted in permissions a lot.
Confirmed on 3.0.2 as well
Confirmed on 2.4.11
We have Registration Form Disabled because out Rocket.Chat environment is LDAP-enabled and for now isolated for external users.
We plan to set Registration Form to Secret URL after that RocketChat/feature-requests#295 feature will be implemented, i.e when new registered users will be associated with custom role, that restricted in permissions a lot.
Hi @ankar84
can you give some hints how you did the LDAP integration ?
I'm using OpenLDAP and is working well but cannot see any users in Rocket.Chat. Thanks
can you give some hints how you did the LDAP integration ?
I'm using OpenLDAP and is working well but cannot see any users in Rocket.Chat
Hi, @nunoguerreiro
It a little bit offtopic here but anyway.
There is no rocket science in LDAP integration and all in documentation and good explained it Admin UI.
To get users from LDAP you need to configure Admin UI => LDAP => Sync/Import and after configuration Press Execute Synchronization Now button, and be sure to configure Background Sync Interval because we see, that manual and background synchronizations not same (Background Sync Interval do more things).
You can DM me at open.rocket.chat for details.
I think the problem is here: https://github.com/RocketChat/Rocket.Chat/blob/develop/app/ui/client/views/app/invite.js#L16
In particular in this test: settings.get ('Accounts_RegistrationForm')! == 'Disabled'
What is the purpose of this test actually?
Hi, I have the same issue with RC 2.4.9. Any tip about that?
Version 2.4.9
Apps Engine Version 1.11.2
Database Migration 170
Database Migration Date August 14, 2020 9:26 PM
Installed at August 14, 2020 1:43 PM
Uptime 4 days, 1 hours, 46 minutes, 22 seconds
Deployment ID ipvErvqS5xkRSHG79
PID 986
Running Instances 1
OpLog Enabled
Any tip about that?
Upgrade minimum to 3.2.0
Better on recent and modern 3.5.2
Most helpful comment
Confirmed on 2.4.11