{"action":"created","issue":{"url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/issues/1","repository_url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat","labels_url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/issues/1/comments","events_url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/issues/1/events","html_url":"https://github.com/xanthous-tech/Rocket.Chat/pull/1","id":351080934,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NzYzNzg5","number":1,"title":"[WIP] Wechat oauth (first draft)","user":{"login":"lhr0909","id":1154575,"node_id":"MDQ6VXNlcjExNTQ1NzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1154575?v=4","gravatar_id":"","url":"https://api.github.com/users/lhr0909","html_url":"https://github.com/lhr0909","followers_url":"https://api.github.com/users/lhr0909/followers","following_url":"https://api.github.com/users/lhr0909/following{/other_user}","gists_url":"https://api.github.com/users/lhr0909/gists{/gist_id}","starred_url":"https://api.github.com/users/lhr0909/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhr0909/subscriptions","organizations_url":"https://api.github.com/users/lhr0909/orgs","repos_url":"https://api.github.com/users/lhr0909/repos","events_url":"https://api.github.com/users/lhr0909/events{/privacy}","received_events_url":"https://api.github.com/users/lhr0909/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-16T07:06:22Z","updated_at":"2018-08-23T13:16:24Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/pulls/1","html_url":"https://github.com/xanthous-tech/Rocket.Chat/pull/1","diff_url":"https://github.com/xanthous-tech/Rocket.Chat/pull/1.diff","patch_url":"https://github.com/xanthous-tech/Rocket.Chat/pull/1.patch"},"body":"<!-- INSTRUCTION: Your Pull Request name should start with one of the following tags -->\r\n<!-- [NEW] For new features -->\r\n<!-- [FIX] For bug fixes -->\r\n<!-- [BREAK] For pull requests including breaking changes -->\r\n\r\n<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->\r\nattempting to close https://github.com/RocketChat/Rocket.Chat/issues/7576\r\n\r\n<!-- INSTRUCTION: Link to a https://github.com/RocketChat/docs PR with added/updated documentation or an update to the missing/outdated documentation list, see https://rocket.chat/docs/contributing/documentation/  -->\r\n\r\n<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can -->\r\n\r\nWe followed [Chinese version of this documentation](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=en_US) to integrate WeChat OAuth. However, we weren't too familiar with the entire integration process as of yet, so we only managed to hack the custom OAuth to support WeChat OAuth process.\r\n\r\nBasically, WeChat's OAuth is tied to an Official Account. There is an extra step to retrieve a `code` from the WeChat server, in order to verify that the official account has the permissions to use OAuth, and we need to use the said `code` in order to request `access_token`. and get user info.\r\n\r\nHere is the custom OAuth ingress.\r\n\r\n![image](https://user-images.githubusercontent.com/1154575/44194003-4b30e880-a167-11e8-91f0-82fea230269b.png)\r\n\r\nQR code verification that comes from WeChat, needs to scan with WeChat App to authorize: \r\n![image](https://user-images.githubusercontent.com/1154575/44194037-5e43b880-a167-11e8-9843-b9f51503bd68.png)\r\n\r\nBasically we would like the RocketChat team to give us pointers and see how to properly integrate into RocketChat as a supported OAuth method."},"comment":{"url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/issues/comments/415410198","html_url":"https://github.com/xanthous-tech/Rocket.Chat/pull/1#issuecomment-415410198","issue_url":"https://api.github.com/repos/xanthous-tech/Rocket.Chat/issues/1","id":415410198,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTQxMDE5OA==","user":{"login":"engelgabriel","id":1000217,"node_id":"MDQ6VXNlcjEwMDAyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1000217?v=4","gravatar_id":"","url":"https://api.github.com/users/engelgabriel","html_url":"https://github.com/engelgabriel","followers_url":"https://api.github.com/users/engelgabriel/followers","following_url":"https://api.github.com/users/engelgabriel/following{/other_user}","gists_url":"https://api.github.com/users/engelgabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/engelgabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/engelgabriel/subscriptions","organizations_url":"https://api.github.com/users/engelgabriel/orgs","repos_url":"https://api.github.com/users/engelgabriel/repos","events_url":"https://api.github.com/users/engelgabriel/events{/privacy}","received_events_url":"https://api.github.com/users/engelgabriel/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T13:16:24Z","updated_at":"2018-08-23T13:16:24Z","author_association":"NONE","body":"Hi @lhr0909 this looks very cool! Can you please open a Pull Request to our main project so we can collaborate and merge? it?"}}
{"actor":{"display_login":"engelgabriel"}}