{"action":"created","issue":{"url":"https://api.github.com/repos/CaliOpen/Caliopen/issues/1120","repository_url":"https://api.github.com/repos/CaliOpen/Caliopen","labels_url":"https://api.github.com/repos/CaliOpen/Caliopen/issues/1120/labels{/name}","comments_url":"https://api.github.com/repos/CaliOpen/Caliopen/issues/1120/comments","events_url":"https://api.github.com/repos/CaliOpen/Caliopen/issues/1120/events","html_url":"https://github.com/CaliOpen/Caliopen/issues/1120","id":386287952,"node_id":"MDU6SXNzdWUzODYyODc5NTI=","number":1120,"title":"oauth redirection callback - oauth popup does not close automatically","user":{"login":"iamdey","id":65737,"node_id":"MDQ6VXNlcjY1NzM3","avatar_url":"https://avatars0.githubusercontent.com/u/65737?v=4","gravatar_id":"","url":"https://api.github.com/users/iamdey","html_url":"https://github.com/iamdey","followers_url":"https://api.github.com/users/iamdey/followers","following_url":"https://api.github.com/users/iamdey/following{/other_user}","gists_url":"https://api.github.com/users/iamdey/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdey/subscriptions","organizations_url":"https://api.github.com/users/iamdey/orgs","repos_url":"https://api.github.com/users/iamdey/repos","events_url":"https://api.github.com/users/iamdey/events{/privacy}","received_events_url":"https://api.github.com/users/iamdey/received_events","type":"User","site_admin":false},"labels":[{"id":340838798,"node_id":"MDU6TGFiZWwzNDA4Mzg3OTg=","url":"https://api.github.com/repos/CaliOpen/Caliopen/labels/api","name":"api","color":"f7c6c7","default":false},{"id":339992820,"node_id":"MDU6TGFiZWwzMzk5OTI4MjA=","url":"https://api.github.com/repos/CaliOpen/Caliopen/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-30T17:50:34Z","updated_at":"2018-12-05T14:47:03Z","closed_at":null,"author_association":"MEMBER","body":"the redirection goes to `https://api.alpha.caliopen.org/api/v2/providers/.../callback...` instead of `https://alpha.caliopen.org/api/v2/providers/.../callback...` \r\nhas described in the provider request:\r\n\r\n```\r\n// GET https://alpha.caliopen.org/api/v2/providers/gmail\r\n{\"name\":\"gmail\",\"oauth_callback_uri\":\"/api/v2/providers/gmail/callback\",\"oauth_request_url\":\"...\"}\r\n```\r\n\r\nSo the popup cannot be closed automatically"},"comment":{"url":"https://api.github.com/repos/CaliOpen/Caliopen/issues/comments/444510255","html_url":"https://github.com/CaliOpen/Caliopen/issues/1120#issuecomment-444510255","issue_url":"https://api.github.com/repos/CaliOpen/Caliopen/issues/1120","id":444510255,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDUxMDI1NQ==","user":{"login":"iamdey","id":65737,"node_id":"MDQ6VXNlcjY1NzM3","avatar_url":"https://avatars0.githubusercontent.com/u/65737?v=4","gravatar_id":"","url":"https://api.github.com/users/iamdey","html_url":"https://github.com/iamdey","followers_url":"https://api.github.com/users/iamdey/followers","following_url":"https://api.github.com/users/iamdey/following{/other_user}","gists_url":"https://api.github.com/users/iamdey/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdey/subscriptions","organizations_url":"https://api.github.com/users/iamdey/orgs","repos_url":"https://api.github.com/users/iamdey/repos","events_url":"https://api.github.com/users/iamdey/events{/privacy}","received_events_url":"https://api.github.com/users/iamdey/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T14:47:03Z","updated_at":"2018-12-05T14:47:03Z","author_association":"MEMBER","body":"popup detector should check when browser is back on the instance domain.\r\n\r\nthe relative URI should work with relative URI:\r\n`popup.window.location.href.includes(popup.provider.oauth_callback_uri)`\r\n\r\nBut it fails and I suppose it is due to CORS that avoid access to the content of the window, since the actual URI is `https://api.alpha.caliopen.org...`\r\n\r\nAfterward I think there is an other pbm with this URI : caliopen bearer is managed by express and (for now) nobody should access to `https://api.xxxx` directly.\r\n\r\nFinally, the solution should be to redirect the browser to `https://mon.instance-caliopen.tld/...`, in our case: `https://alpha.caliopen.org/api/v2/...`\r\n\r\n"}}
{"actor":{"display_login":"iamdey"}}