Satellizer plugin and oAuth2 Envato API problem

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:

        name: 'envato',
        url: '/#/login',
        authorizationEndpoint: '',
        redirectUri: 'http://localhost/callback',
        clientId: 'MY-ID',
        platform: 'mobile',
        responseType: 'token'

From authorization server I have got “code”, so this part works fine, but after I click on Authorize button popup doesn’t close and have error “Load Error”.

In logs i have message:

webView:didFailLoadWithError - -1004: Could not connect to the server.

Everyone can help me?


hmmm … its not my API.

I try emulate app in android and I had this page:


I have all params right, so API works fine. Its problem with redirect back to my app.

Try adding this plugin: ionic plugin add cordova-plugin-whitelist otherwise http requests are blocked - as of the latest Cordova version.

I installed this plugin, and to my config.xml file added:

<access origin="*"/>
<allow-intent href="http://*/*"/>
<allow-navigation href="*" />

… and its not work for me. I have same error.

Does anyone have any idea? :confused:

redirectUri: window.location.origin || window.location.protocol + ‘//’ +,

And change the redirect configuration with your callback:
$authProvider.loginRedirect = ‘/’; // Change this relative path

You can check it too: