{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8781","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8781/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8781/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8781/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/8781","id":271241810,"node_id":"MDU6SXNzdWUyNzEyNDE4MTA=","number":8781,"title":"Iframe auth workflow needed.","user":{"login":"phuyem","id":1644264,"node_id":"MDQ6VXNlcjE2NDQyNjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1644264?v=4","gravatar_id":"","url":"https://api.github.com/users/phuyem","html_url":"https://github.com/phuyem","followers_url":"https://api.github.com/users/phuyem/followers","following_url":"https://api.github.com/users/phuyem/following{/other_user}","gists_url":"https://api.github.com/users/phuyem/gists{/gist_id}","starred_url":"https://api.github.com/users/phuyem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phuyem/subscriptions","organizations_url":"https://api.github.com/users/phuyem/orgs","repos_url":"https://api.github.com/users/phuyem/repos","events_url":"https://api.github.com/users/phuyem/events{/privacy}","received_events_url":"https://api.github.com/users/phuyem/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-05T02:01:54Z","updated_at":"2018-07-13T04:33:18Z","closed_at":"2017-11-06T12:32:33Z","author_association":"NONE","body":"For people who is new to Rocketchat like me, it is really hard to figure out how it works. It took me days to understand it by reading the docs ( which are very well written) and the source code. \r\n\r\nhttps://docs.rocket.chat/developer-guides/iframe-integration/authentication/\r\n\r\nThe workflow is something like this, just someone in the future google this page  : \r\n\r\n1/ Enable Iframe in Admininstraton> Accounts > Iframe\r\n2/ Rocketchat will disable its login page, so that\r\n3/ When user enter Rocketchat website, the software will try to login using a token getting from API URL ( api from your website, not from Rocketchat )\r\n4a/ If successful, then user is logged in automatically\r\n4b/ If failed, the IFrame URL ( a login page from your website, not Rocket chat ) will be show for user to authenticate \r\n5/ If successful,  your website is responsible to redirect user to chat screen, somewhat. \r\n\r\n "},"comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments/404722786","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/8781#issuecomment-404722786","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/8781","id":404722786,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDcyMjc4Ng==","user":{"login":"christtrc","id":10356940,"node_id":"MDQ6VXNlcjEwMzU2OTQw","avatar_url":"https://avatars1.githubusercontent.com/u/10356940?v=4","gravatar_id":"","url":"https://api.github.com/users/christtrc","html_url":"https://github.com/christtrc","followers_url":"https://api.github.com/users/christtrc/followers","following_url":"https://api.github.com/users/christtrc/following{/other_user}","gists_url":"https://api.github.com/users/christtrc/gists{/gist_id}","starred_url":"https://api.github.com/users/christtrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christtrc/subscriptions","organizations_url":"https://api.github.com/users/christtrc/orgs","repos_url":"https://api.github.com/users/christtrc/repos","events_url":"https://api.github.com/users/christtrc/events{/privacy}","received_events_url":"https://api.github.com/users/christtrc/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T04:33:18Z","updated_at":"2018-07-13T04:33:18Z","author_association":"NONE","body":"@phuyem Hi, I have a problem to use iframe auth.  The API URL called from iframe page has nothing to be related with current user in parent page. How can I know the current login user in the API URL handling method of the server side (I use java)? \r\nWhen I use session to solve this, but the session id which loginToken generate method have is different with API URL auth method. Any help, thanks.\r\n"}}
{"actor":{"display_login":"christtrc"}}