Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Google Signin #13

Closed
deadsoul44 opened this issue Dec 6, 2019 · 2 comments
Closed

Problem with Google Signin #13

deadsoul44 opened this issue Dec 6, 2019 · 2 comments

Comments

@deadsoul44
Copy link

deadsoul44 commented Dec 6, 2019

Hello,

Thank you for the great package again.

I have a problem with google signin. I am trying to use the signInWithGoogle method.

I had to modify the auth.dart file to print the following exception:
PlatformException(exception, Unknown signInOption, null)

Gist link for the signin page:
https://gist.github.com/deadsoul44/f95c72c3d7a3529d4ac2efce751a3866

I am able to get the google user account with the "vanilla" google signin.

Stacktrace:
I/flutter (20513): Caught: PlatformException(exception, Unknown signInOption, null) I/flutter (20513): Stack: #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7) I/flutter (20513): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33) I/flutter (20513): <asynchronous suspension> I/flutter (20513): #2 MethodChannelGoogleSignIn.init (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:26:20) I/flutter (20513): #3 GoogleSignIn._ensureInitialized (package:google_sign_in/google_sign_in.dart:228:62) I/flutter (20513): #4 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:210:11) I/flutter (20513): <asynchronous suspension> I/flutter (20513): #5 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:266:18) I/flutter (20513): <asynchronous suspension> I/flutter (20513): #6 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:336:9) I/flutter (20513): #7 Auth.signInWithGoogle (package:auth/auth.dart:686:43) I/flutter (20513): #8 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6) I/flutter (20513): #9 Auth.signInWithGoogle (package:auth/auth.dart:674:32) I/flutter (20513): #10 _LoginPageState.build.<anonymous closure>

As a workaround, I tried to initialize the auth with explicitly defining signInOption and it worked:
auth = Auth.init( signInOption: SignInOption.standard, scopes: [ 'email', 'https://www.googleapis.com/auth/contacts.readonly', ], );

@Andrious
Copy link
Member

Indeed. I like to think this has been addressed two days ago.

@deadsoul44
Copy link
Author

It is working now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants