Coder Social home page Coder Social logo

ionicthemes / ionic-google-login Goto Github PK

View Code? Open in Web Editor NEW
59.0 8.0 47.0 35.66 MB

Ionic 4 starter app to show you how to add Google Log In to an Ionic App using Google Sign-In Cordova Plugin.

Home Page: https://ionicthemes.com/tutorials/about/ionic-google-login

TypeScript 57.89% HTML 10.87% JavaScript 14.44% SCSS 16.79%
ionic3 ionic-framework ionic-apps google-login ionic google-authentication tutorial ionic-4 ionic4 ionic4-example

ionic-google-login's People

Contributors

djabif avatar gonzad77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-google-login's Issues

Does not work on samsung?

I have tried to deploy the app in a Samsung tablet (SM-T231 if it matters) running android 4.4.2.

when i try to press login, the following error comes up in the logcat:

I/GooglePlugin(16037): Building Google options
I/GooglePlugin(16037): Building GoogleApiClient
I/GooglePlugin(16037): GoogleApiClient built
I/GooglePlugin(16037): Trying to Log in!
E/Parcel  ( 1181): Class not found when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
E/Parcel  ( 1181): java.lang.ClassNotFoundException: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
E/Parcel  ( 1181): 	at java.lang.Class.classForName(Native Method)
E/Parcel  ( 1181): 	at java.lang.Class.forName(Class.java:251)
E/Parcel  ( 1181): 	at java.lang.Class.forName(Class.java:216)
E/Parcel  ( 1181): 	at android.os.Parcel.readParcelableCreator(Parcel.java:2140)
E/Parcel  ( 1181): 	at android.os.Parcel.readParcelable(Parcel.java:2104)
E/Parcel  ( 1181): 	at android.os.Parcel.readValue(Parcel.java:2020)
E/Parcel  ( 1181): 	at android.os.Parcel.readArrayMapInternal(Parcel.java:2321)
E/Parcel  ( 1181): 	at android.os.Bundle.unparcel(Bundle.java:249)
E/Parcel  ( 1181): 	at android.os.Bundle.getString(Bundle.java:1118)
E/Parcel  ( 1181): 	at android.content.Intent.getStringExtra(Intent.java:5145)
E/Parcel  ( 1181): 	at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1466)
E/Parcel  ( 1181): 	at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1061)
E/Parcel  ( 1181): 	at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4067)
E/Parcel  ( 1181): 	at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3965)
E/Parcel  ( 1181): 	at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:159)
E/Parcel  ( 1181): 	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2646)
E/Parcel  ( 1181): 	at android.os.Binder.execTransact(Binder.java:404)
E/Parcel  ( 1181): 	at dalvik.system.NativeStart.run(Native Method)
E/Parcel  ( 1181): Caused by: java.lang.NoClassDefFoundError: com/google/android/gms/auth/api/signin/internal/SignInConfiguration
E/Parcel  ( 1181): 	... 18 more
E/Parcel  ( 1181): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.auth.api.signin.internal.SignInConfiguration" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/Parcel  ( 1181): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/Parcel  ( 1181): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
E/Parcel  ( 1181): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
E/Parcel  ( 1181): 	... 18 more

Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin'.

got this error on

this.googlePlus.login({
'scopes': '', // optional, space-separated list of scopes, If not included or empty, defaults to profile and email.
'webClientId': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com', // optional clientId of your Web application from Credentials settings of your project - On Android, this MUST be included to get an idToken. On iOS, it is not required.
'offline': true
})

shows this error on the console

index.html:1 Refused to display 'https://accounts.google.com/o/oauth2/auth?redirect_uri=storagerelay%3A%2F%2Fhttp%2Flocalhost%3A8000%3Fid%3Dauth751720&response_type=permission%20id_token&scope=email%20profile%20openid&openid.realm=&client_id=781145103219-vn75hrm8tv0b54hkck4dokv5nnr0pvao.apps.googleusercontent.com&ss_domain=http%3A%2F%2Flocalhost%3A8000&fetch_basic_profile=true&gsiwebsdk=2' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Ionic:

ionic (Ionic CLI) : 4.0.3
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.9

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : not available

System:

NodeJS : v8.11.1 (D:\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10

Error after success login

After success login with my user and password, the UserPage page never been loaded!

when using function GooglePlus.trySilentLogin get the error "4" and on GooglePlus.login get the error "12501"!

how to keep session alive till user manually logout

I created ionic4 application in which i am trying to backup user data in user's google drive.
for that i implemented google login with google drive scope. but accessToken gets expired after some time.
Application don't have any backend services. so i want to schedule drive backup in my app for that i need to keep google login token alive.
Can we do that using cordova google plus plugin ?
I tried to look api of refresh token on google docs also but it only have example with java and python.
Can you please add example of how to keep google session alive ?

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.