Ionic cloud Auth No provider


#1

Trying to use ionic-cloud’s auth module, I get this error

: No provider for Auth!

My page simply looks like

login(){
      this.auth.login('google').then(
          ()=>{
              console.log("Hello");
          }
      );

  }

#2

Bump! Getting the same issue.


#3

Have you added this Auth to your AppModule's providers array?


#4

Yes, that results in
deps is undefined


#5

You need to setup your project before using it. http://docs.ionic.io/setup.html

@NgModule({
  declarations: [ ... ],
  imports: [
    IonicModule.forRoot(MyApp),
    CloudModule.forRoot(cloudSettings)
  ],
  bootstrap: [IonicApp],
  entryComponents: [ ... ],
  providers: [ ... ]
})

registers the provider.