Closed volkankoc closed 11 months ago
@volkankoc
I experienced this when I skipped part 8 of the iOS setup instruction of the google_sign_in setup process to add CFBundleURLTypes
in the Info.plist
file. Could you double check if you have gone though the setup process properly for iOS?
https://pub.dev/packages/google_sign_in#ios-integration__
@volkankoc I experienced this when I skipped part 8 of the iOS setup instruction of the google_sign_in setup process to add
CFBundleURLTypes
in theInfo.plist
file. Could you double check if you have gone though the setup process properly for iOS? https://pub.dev/packages/google_sign_in#ios-integration__
I did this. But the problem is still the same. IOS emulator App closes directly. There is no session on Android either.
Should we create a firebase app for the application and enable Google Auth permission?
What is this ? Where is the YOUR SERVER CLIENT ID?
@volkankoc There are two ways to setup Google login. One that involves using Firebase, and one that does not. Either way should work, but step 7 is only required if you are setting it up using Firebase. I was able to sign in just fine without ever going to Firebase. If you are just directly setting up Google sign in, then you can skip step 3 - 7 as it says the following in the readme of google_sign_in package. You should actually be able to skip step 1 and 2 too.
As an alternative to adding GoogleService-Info.plist to your Xcode project, you can instead configure your app in Dart code. In this case, skip steps 3 to 7 and pass clientId and serverClientId to the GoogleSignIn constructor:
You might be making a mistake on step 8 where you enter the reverse DNS form of your iOS client ID. What is your iOS client ID and what does your CFBundleURLTypes
section in your Info.plist
file look like?
my info.plist file
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- TODO Replace this value: -->
<!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID -->
<string>com.googleusercontent.apps.123398018758-7n68sbf041gued3q2o28r850eoqrqfif</string>
</array>
</dict>
</array>
</dict>
</plist>
@volkankoc Okay, that seems fine. I would also make sure that the bundle ID matches the one you used to register the iOS client ID.
Also, I just noticed that in your original screenshot you shared, I see some log messages about Firebase, but are you using Firebase or not in this project? Without Firebase, the step to enable native Google sign in should be the following:
CFBundleTypeRole
to your Info.plist
fileTry removing the supabase_flutter plugin and any Supabase related code you are using to isolate the issue.
If the app is crashing as soon as you call the _googleSignIn()
method with Supabase code removed, then the issue lies on the google_sign_in plugin and not Supabase. If this is the case, then I would suggest you to open an issue with on the Flutter rpeo as the google_sign_in
package is maintained by them.
Also just a shot in the dark, but making sure you are using the latest Flutter version always helps. As well as running flutter clean
Also, if you are using Firebase, you don't need the CFBundleTypeRole
in your Info.plist
file.
Either you are or you are not using Firebase, just be sure to follow the setup instructions on google_sign_in plugin carefully, and you should be able to perform Google sign in without an issue.
I did all the steps. Unfortunately it didn't happen again. iOS emulator crashes. I tried it on Android emulator and it didn't work either. User list appears on Android. But the auth process does not happen.
I debugged the codes. iOS crash occurs in this line.
GCP
Supabase google provider
We are using firebase in the project. But only remote config. The firebase packages I use are core and remote config.
Finally. Previous native login works. I'm having problems with the new build.
@volkankoc If you are using Firebase for anything, you have to configure Google sign in through Firebase. It seems like you haven't followed the instruction on google_sign_in package properly in that case.
Here are things that I can find that you have mis-configured if you are using Firebase:
GoogleSignIn
object as it says on step 8.
final googleSignIn = GoogleSignIn();
@volkankoc
You can find the web client ID from the GCP project associated to your Firebase project. You seem to be using a different project, which is probably what is causing the crash. After registering the app on Firebase, you should already see a web client ID generated by Firebase on your GCP project.
I dont understand this
...... I will we create a flutter project in firebase? So when choosing a platform should I choose Android, iOS or Flutter?
@volkankoc
You can find the web client ID from the GCP project associated to your Firebase project. You seem to be using a different project, which is probably what is causing the crash. After registering the app on Firebase, you should already see a web client ID generated by Firebase on your GCP project.
Every Firebase project has an GCP project associated to it. You need to find the GCP project associated to your Firebase project that you have connected to your Flutter app and copy and paste the web client ID of the GCP project into Supabase dashboard under auth -> providers -> Google -> Authorized Client IDs
.
Sorry, but I can no longer assist you as you seem to have trouble setting up Google sign in on Flutter before even reaching Supabase.
I suggest you to read the instructions on google_sign_in and follow it carefully. Should you have any further questions regarding setting it up, open an issue on the Flutter repository. If you have any Supabase specific questions, feel free to open an issue at any time.
I solved my problem. I searched this gcp firebase project name. I used automatically generated keys. And the result is successful. Thanks a lot.
Describe the bug The newly announced google signin method directly crashes the application in the ios emulator. Auth transaction does not occur on Android
Expected behavior Waiting for the Auth transaction to occur
Screenshots
Version (please complete the following information): On Linux/macOS Please run
dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client"
in your project directory and paste the output here. supabase_flutter 1.10.24 │ ├── supabase 1.11.11 │ │ ├── functions_client 1.3.2 │ │ ├── gotrue 1.12.6 │ │ ├── postgrest 1.5.2 │ │ ├── realtime_client 1.4.0 │ │ ├── storage_client 1.5.4