{"action":"created","issue":{"url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART/issues/3","repository_url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART","labels_url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART/issues/3/comments","events_url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART/issues/3/events","html_url":"https://github.com/smart-on-fhir/Swift-SMART/issues/3","id":177013876,"number":3,"title":"I can't get authenticated","user":{"login":"devjamie","id":18741887,"avatar_url":"https://avatars.githubusercontent.com/u/18741887?v=3","gravatar_id":"","url":"https://api.github.com/users/devjamie","html_url":"https://github.com/devjamie","followers_url":"https://api.github.com/users/devjamie/followers","following_url":"https://api.github.com/users/devjamie/following{/other_user}","gists_url":"https://api.github.com/users/devjamie/gists{/gist_id}","starred_url":"https://api.github.com/users/devjamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devjamie/subscriptions","organizations_url":"https://api.github.com/users/devjamie/orgs","repos_url":"https://api.github.com/users/devjamie/repos","events_url":"https://api.github.com/users/devjamie/events{/privacy}","received_events_url":"https://api.github.com/users/devjamie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-09-14T20:36:21Z","updated_at":"2016-10-06T13:53:41Z","closed_at":null,"body":"Whenever I try to authorize it's giving me an invalid address error.\r\n\r\nHere is my func\r\n\r\nfunc testSomeClasses(){\r\n        print(\"testSomeClasses\")\r\n        let smart = Client(\r\n            baseURL: \"https://fhir-api-dstu2.smarthealthit.org\",\r\n            settings: [\r\n                //\"client_id\": \"my_mobile_app\",\r\n                \"redirect\": \"smartapp://callback\",    // must be registered\r\n            ]\r\n        )\r\n        print(\"testSomeClasses 2\")\r\n        smart.authProperties.embedded = true\r\n        smart.authProperties.granularity = .TokenOnly  // same with .PatientSelectNative\r\n        print(\"testSomeClasses 3\")\r\n        smart.authorize() { patient, error in\r\n            print(\"testSomeClasses 4\")\r\n            if let error = error {\r\n                // there was an error\r\n                 print(\"testSomeClasses error \", error)\r\n            }\r\n            else {\r\n                 print(\"hello\")\r\n                print(patient?.name)\r\n                // `patient` is a \"Patient\" resource on success, unless you've used\r\n                // the `TokenOnly` granularity\r\n            }\r\n        }\r\n        \r\n        \r\n    }\r\n\r\nConsole prints:\r\ntestSomeClasses\r\ntestSomeClasses 2\r\ntestSomeClasses 3\r\n\r\n![screen shot 2016-09-14 at 4 31 39 pm](https://cloud.githubusercontent.com/assets/18741887/18528941/135a0956-7a99-11e6-8734-96d90403d13e.png)"},"comment":{"url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART/issues/comments/251967806","html_url":"https://github.com/smart-on-fhir/Swift-SMART/issues/3#issuecomment-251967806","issue_url":"https://api.github.com/repos/smart-on-fhir/Swift-SMART/issues/3","id":251967806,"user":{"login":"p2","id":358485,"avatar_url":"https://avatars.githubusercontent.com/u/358485?v=3","gravatar_id":"","url":"https://api.github.com/users/p2","html_url":"https://github.com/p2","followers_url":"https://api.github.com/users/p2/followers","following_url":"https://api.github.com/users/p2/following{/other_user}","gists_url":"https://api.github.com/users/p2/gists{/gist_id}","starred_url":"https://api.github.com/users/p2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p2/subscriptions","organizations_url":"https://api.github.com/users/p2/orgs","repos_url":"https://api.github.com/users/p2/repos","events_url":"https://api.github.com/users/p2/events{/privacy}","received_events_url":"https://api.github.com/users/p2/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T13:53:41Z","updated_at":"2016-10-06T13:53:41Z","body":"Yes, this is correct, it will redirect to the \"redirect\" URL that you have specified in the settings dict. Have you registered that URL scheme in your app?"}}
{"actor":{"display_login":"p2"}}