I'm trying to Integrate GooglePlus signin to Ionic w/ Angular app.
error:
ERROR Error: Uncaught (in promise): Error: Invalid provider for the NgModule 'UsersModule' - only instances of Provider and Type are allowed, got: [Keyboard, ?[object Object]?]
users.module.ts
...
import { GooglePlus } from '@ionic-native/google-plus';
@NgModule({
declarations: [
...
],
entryComponents: [
...
],
imports: [
...
],
exports: [
...
],
providers: [
...,
GooglePlus
]
})
export class UsersModule { }
You need to change your import path to:
You may see a build error:
Just install the
@ionic-native/coredependency and you should be good to go.Last thought, If you have trouble with that Cordova plugin, another option is
@codetrix-studio/capacitor-google-auth. Simon Grimm has a great blog, How to add Capacitor Google Sign In to your Ionic App, which describes all the steps necessary to get Google auth working.