Ionic User: Error: CORS request rejected

Hello all,

am facing big time error of my life and i don’t known what to do, when ever i try to save user to my ionic user service using the following code

    Ionic.io();
                 var user = Ionic.User.current();
                    if(user.id){
                        user.set('name', username);
                        //user.set('image',image_name);
                    }
                 user.save();

then i get this error

ionic.io.bundle.min.js:1 OPTIONS https://api.ionic.io/auth/users/null t @ ionic.io.bundle.min.js:1e @ ionic.io.bundle.min.js:1(anonymous function) @ ionic.io.bundle.min.js:2D @ ionic.io.bundle.min.js:1G @ ionic.io.bundle.min.js:1t @ ionic.io.bundle.min.js:2i.value @ ionic.io.bundle.min.js:2(anonymous function) @ controllers.js:25processQueue @ ionic.bundle.js:27879(anonymous function) @ ionic.bundle.js:27895Scope.$eval @ ionic.bundle.js:29158Scope.$digest @ ionic.bundle.js:28969(anonymous function) @ ionic.bundle.js:29197completeOutstandingRequest @ ionic.bundle.js:18706(anonymous function) @ ionic.bundle.js:18978
:8100/#/tab/home:1 XMLHttpRequest cannot load https://api.ionic.io/auth/users/null. Response for preflight has invalid HTTP status code 404
ionic.io.bundle.min.js:2 Ionic User: Error: CORS request rejected: https://api.ionic.io/auth/users/null(…)

and another quick question is why is the url https://api.ionic.io/auth/users/null is null

I have the same issue, did you find solution?

nope, i never found the solution