RocketChat / RocketChat/Rocket.Chat

client_id is not a function and this.data is undefined in oauth2-client

Open
#25,543 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

https://github.com/RocketChat/Rocket.Chat/blob/10bdc7f3b6823c579a5ff5473fe4b9f5e67d1b94/app/oauth2-server-config/client/oauth/oauth2-client.js#L59

  • client_id is not a function
  • this.data is undefined in onRendered
  • if switch out this.data for var dataContext = Template.currentData(); dataContext is also undefined, something is wrong with blaze
  • why not just use (new URL(document.location)).searchParams.get('client_id') it simpler and not undefined.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/oauth2-server-config/client/oauth/oauth2-client.js at the linked line and inspect the client_id reference and the onRendered handler. Compare the reported undefined values with Template.currentData() and the URL searchParams approach; done means the OAuth2 client no longer errors and obtains the required client_id and data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.