RocketChat / RocketChat/Rocket.Chat
Custom wordpress oauth with miniorange
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
When trying to login with the custom oauth direction I get the following error
W20190518-12:53:21.096(-5) (oauth_server.js:392) Error in OAuth Server: Failed to fetch identity from torauth at http://talesofrokugan.com/wp-content/plugins/miniorange-oauth-20-server/web/index.php/moserver/resource. failed [400] {"error":"invalid_bearer_token","error_description":"OAuth2 Access token is empty"}
I20190518-12:53:23.037(-5) Exception while invoking method 'login' { Error: Failed to fetch identity from torauth at http://talesofrokugan.com/wp-content/plugins/miniorange-oauth-20-server/web/index.php/moserver/resource. failed [400] {"error":"invalid_bearer_token","error_description":"OAuth2 Access token is empty"} at CustomOAuth.getIdentity (app/custom-oauth/server/custom_oauth_server.js:178:18) at Object.OAuth.registerService.query [as handleOauthRequest] (app/custom-oauth/server/custom_oauth_server.js:188:26) at OAuth._requestHandlers.(anonymous function) (packages/oauth2/oauth2_server.js:10:33) at middleware (packages/oauth/oauth_server.js:161:5) at /snap/rocketchat-server/1377/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 message: 'Failed to fetch identity from torauth at http://talesofrokugan.com/wp-content/plugins/miniorange-oauth-20-server/web/index.php/moserver/resource. failed [400] {"error":"invalid_bearer_token","error_description":"OAuth2 Access token is empty"}', response: { statusCode: 400, content: '{"error":"invalid_bearer_token","error_description":"OAuth2 Access token is empty"}', headers: { date: 'Sat, 18 May 2019 17:53:20 GMT', server: 'Apache/2.4.34 (Ubuntu)', 'cache-control': 'no-cache', 'www-authenticate': 'Bearer realm="Service", error="invalid_bearer_token", error_description="OAuth2 Access token is empty"', 'content-length': '83', connection: 'close', 'content-type': 'application/json' }, data: { error: 'invalid_bearer_token', error_description: 'OAuth2 Access token is empty' } } }
Server Setup Information:
- Version of Rocket.Chat Server: 1.0.3
- Operating System: ubuntu server 18.04
- Deployment Method: snap install
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
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 with app/custom-oauth/server/custom_oauth_server.js, especially the getIdentity path at the reported line, then trace the request through packages/oauth2/oauth2_server.js. Reproduce login with the MiniOrange WordPress OAuth server and verify that the identity request succeeds with a non-empty access token.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wordpress
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100