RocketChat / RocketChat/Rocket.Chat
API Login for ldap synced user does not work until first browser login
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
On a fresh setup of rocketchat, bound against an LDAP server, it is not possible to use the api of a user if the user has not logged in via the browser interface first.
Steps to reproduce:
- Setup a fresh Rocket.Chat installation with LDAP as user authentication background
- Run
curl -k http://localhost/chat/api/v1/login -d "user=demouser&password=demouser"as many times as you want - you always get{"status":"error","error":"Unauthorized","message":"Unauthorized"} - Login the user
demouservia the browser interface - Run
curl -k http://localhost/chat/api/v1/login -d "user=demouser&password=demouser"again you receive{"status":"success","data":{"userId":"ZkEZwgy8vfMbRnvuC","authToken"...
Expected behavior:
The API should be usable without requiring the browser login as a separate step.
Actual behavior:
as described above
Server Setup Information:
- Version of Rocket.Chat Server: 1.3.2
- Operating System: Debian Linux 10
- Deployment Method: Docker
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the API login endpoint /api/v1/login and reproduce the LDAP case with the provided curl request before any browser login. Compare the API login path with the browser login flow; done means an LDAP-synced user receives a successful API login response without first using the browser interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100