Coder Social home page Coder Social logo

Comments (5)

imhoffd avatar imhoffd commented on May 24, 2024

Gonna need more info/code examples. If that's truly the error you're getting, you probably need to use $ionicAuth and $ionicUser, not ionicAuth and ionicUser. The dollar sign is required because that's the name of the angular service.

from legacy-ionic-cloud.

Alkasih avatar Alkasih commented on May 24, 2024

First in the app I initialized the ionic.cloud

.config(function($ionicCloudProvider) { $ionicCloudProvider.init({ "core": { "app_id": "YOUR-APP-ID" } }); })

And then in the app.js, I want to check if the user is authenticated or not

var user = $ionicUser; //just checking if $ionicUser is called, but it is undefined.

if($ionicAuth.isAuthenticated())//$ionicAuth is undefined

from legacy-ionic-cloud.

imhoffd avatar imhoffd commented on May 24, 2024

@Alkasih Did you inject the $ionicUser and $ionicAuth service? Take a look at https://docs.angularjs.org/guide/di.

In the same way your config service takes $ionicCloudProvider, you must specify $ionicUser and $ionicAuth as dependencies where you need them.

from legacy-ionic-cloud.

Alkasih avatar Alkasih commented on May 24, 2024

Not, I didn't do that. Should I? Yes, I guess. Sorry forget it.

One more question, please. The only reason that bring me to this migration is because of push.unregister(); is always giving me the server responded with a status of 422 (UNPROCESSABLE ENTITY).

I mean can you ensure me if I migrate here than push.unregister() will work as expected?

from legacy-ionic-cloud.

imhoffd avatar imhoffd commented on May 24, 2024

The ionic-platform-web-client is being deprecated. We are now focussing on this Ionic Cloud client going forward. If something doesn't work as expected, we will fix it here. I've already fixed that push.unregister() issue in this client, but let me know if you encounter any other issues.

from legacy-ionic-cloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.