ionic-team / legacy-ionic-cloud

JavaScript Client for legacy Ionic Cloud services. See Ionic Pro for our new take on the ionic development lifecycle
Apache License 2.0
65 stars 26 forks source link

Auth login basic (Ionic Cloud) not working after ionic build android --prod #192

Open jthoms1 opened 7 years ago

jthoms1 commented 7 years ago

From @adsonrocha on March 22, 2017 10:42

I am using the following code to signin inside a provider:

 signIn(details): Promise<any[]>{
    return new Promise((resolve, reject) => {
      this.auth.login('basic', details).then(() => {
        resolve(someData);
      }, (err: any) => {
        reject(err);
      });
    });
  }

I have properly imported Auth at my provider constructor. It works when I preview on browser and Ionic View, but triggers this error after install an apk generated by "ionic build android --prod":

Error: Request has been terminated. Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is been unloaded, etc.

My internet connection is on. Can anybody help me?

Copied from original issue: driftyco/ionic-cli#2022

janpio commented 7 years ago

Duplicate of #191