1
votes

I'm currently making a web app based on Ionic. I have a login page on which i'd like to integrate a google connect. I tried to install the ionic native Google Connect, but this one doesn't work on browser platform, only iOS and Android. I saw this plugin : https://www.npmjs.com/package/angular2-google-login I tried to install it and i followed the instructions, here is the code :

import { AuthService, AppGlobals } from 'angular2-google-login';

constructor(private _googleAuth: AuthService){
}

 googleLogin() {
    this._googleAuth.authenticateUser(()=>{

    });
  }

The problem is on the node_modules directory. All the modules are in .JS format, but the angular2-google-signin directory has files in .TS. I have this error when i try to run on browser :

Error: ./~/angular2-google-login/index.ts Module build failed: Error: ENOENT: no such file or directory, open '/Desktop/Myproject/node_modules/angular2-google-login/index.js' 

I can't find any solution to put an Angular solution to sign in with Google on a browser platform.. Thank you in advance for any help

1

1 Answers

-1
votes

Not all plugins are meant to run on browser because some are dependent on device native features for e.g SQLite database, camera etc. You should test and run your app in mobile devices.