{"id":7527,"date":"2015-07-18T03:34:14","date_gmt":"2015-07-18T03:34:14","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/07\/18\/satellizer-plugin-and-oauth2-envato-api-open-source-projects-sahat-satellizer\/"},"modified":"2015-07-18T03:34:14","modified_gmt":"2015-07-18T03:34:14","slug":"satellizer-plugin-and-oauth2-envato-api-open-source-projects-sahat-satellizer","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/07\/18\/satellizer-plugin-and-oauth2-envato-api-open-source-projects-sahat-satellizer\/","title":{"rendered":"Satellizer plugin and oAuth2 Envato API-open source projects sahat\/satellizer"},"content":{"rendered":"<p>I try to authenticate with new Envato API with Angular plugin Satellizer. In my localhost everything works fine, but I have problem in emulate mode and on my iPhone.<\/p>\n<p>My settings:<\/p>\n<pre><code>$authProvider.oauth2({\n        name: 'envato',\n        url: '\/#\/login',\n        authorizationEndpoint: 'https:\/\/api.envato.com\/authorization',\n        redirectUri: 'http:\/\/localhost:9000',\n        clientId: 'MY-ID',\n        platform: 'mobile',\n        responseType: 'token'\n    });\n<\/code><\/pre>\n<p>From authorization server I have got \u201ccode\u201d, so this part works fine, but after I click on Authorize button popup doesn&#8217;t close and have error &#8220;Load Error&#8221;.<\/p>\n<p>In logs i have message:<\/p>\n<pre><code>webView:didFailLoadWithError - -1004: Could not connect to the server.\n<\/code><\/pre>\n<p>I try emulate app in android and I had this page:<\/p>\n<p>IMAGE<\/p>\n<p>I have all params right, so API works fine. Its problem with redirect back to my app.<\/p>\n<p>I installed plugin cordova-plugin-whitelist, and to my config.xml file added:<\/p>\n<pre><code>\n\n\n<\/code><\/pre>\n<p>&#8230; and its not work for me. I have same error.<\/p>\n<p>Everyone can help me?<\/p>\n<p>Regards, Krzysiek<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I try to authenticate with new Envato API with Angular plugin Satellizer. In my localhost everything works fine, but I have problem in emulate mode and on my iPhone. My settings: $authProvider.oauth2({ name: &#8216;envato&#8217;, url: &#8216;\/#\/login&#8217;, authorizationEndpoint: &#8216;https:\/\/api.envato.com\/authorization&#8217;, redirectUri: &#8216;http:\/\/localhost:9000&#8217;, clientId: &#8216;MY-ID&#8217;, platform: &#8216;mobile&#8217;, responseType: &#8216;token&#8217; }); From authorization server I have got \u201ccode\u201d, so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7527","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7527"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7527\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}