Satellizer plugin and oAuth2 Envato API-open source projects sahat/satellizer

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: 'envato',
        url: '/#/login',
        authorizationEndpoint: 'https://api.envato.com/authorization',
        redirectUri: 'http://localhost:9000',
        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.

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

IMAGE

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

I installed plugin cordova-plugin-whitelist, and to my config.xml file added:




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

Everyone can help me?

Regards, Krzysiek