Does google authentication work on Android + SDK 35? šŸ˜¢

SDK Version: 35
Platform: Android
Library: expo-google-sign-in

I previously thought that probably I had made a mistake somewhere, and tried to explain what I did here: GoogleSignIn on Android: I can't get it to work (hoping that someone could see the mistake). Iā€™m still open to the possibility that Iā€™m the one who has made a mistake, but Iā€™m starting to suspect that something might be wrong in regards to expo-google-sign-in.

The documentation for google-sign-in on the expo webpages is basically like ā€œhere are a few steps you can follow to get this workingā€. But the readme-file that shows up as documentation on github and npmjs.com says ā€œIf you follow the link [<-- link that doesnā€™t go anywhere] and there is no documentation available then this library is not yet usable within managed projectsā€.

Something that makes me additionally confused is that I did get the library to work on a managed app, but on IOS and not Android. But according to the readme-file on github itā€™s the IOS version that needs additional configuration in a bare non-managed project, while in regards to Android it says ā€œNo additional set up necessaryā€.

Iā€™ve also tried to get expo-google-app-auth to work on Android, so far with no success. For this library the readme-file on github makes no mention of the library not working on managed apps, and the documentation on the expo website doesnā€™t either (in fact it makes explicit mention of the libraryā€™s use in managed apps). But the readme-file of expo-app-auth, the library that (if I understand things correctly) expo-google-app-auth is a wrapper of, says indirectly that the library is not yet usable for managed projects. It says this the same way that this is said in the readme-file for expo-google-sign-in (ā€œif [thing that is true] then this library is not yet usable within managed projectsā€).

It seems clear to me that expoā€™s documentation regarding google authentication is misleading/wrong :confused: Since different parts of it are self-contradictory, at least some parts of it must be wrong. This makes it even more frustrating for me when Iā€™ve tried to follow instructions and spent days trying to get things to work, because I donā€™t know if things arenā€™t working because Iā€™ve done something wrong or because the library just doesnā€™t work for Android. So if someone could help rid me of this confusion that would be appreciated:

Are there anyone here who can confirm that theyā€™ve gotten google authentication to work on Android?

And are there anyone here who can confirm that theyā€™ve gotten google authentication to work on Android with expo-SDK 35?

Iā€™m hoping to get things working on SDK 35, since I need that for Apple login, but if I need to revert to an earlier version to get things working on Android that would also be very useful info. Using a different SDK-version for IOS and Android would not be optimal, but itā€™s a possibility. Having to give up on expo and use bare react native instead would suck :confused:

If anyone can help me out here (be that with a solution, or just a pointer) that would be greatly appreciated!

We did get to the bottom of the problem we had regarding google login on Android. It had to do with the google playstore automatically making changes to google-services.json before publishing the app.

You can find more info regarding this at: Google play console ā†’ app in question from list (on our case ā€œcom.toleio.noā€) ā†’ Release management (in sidebar) ā†’ App signing (in sidebar sub.menu). Here you also find the keys that are put in google-services.json when your app is uploaded. For android-relevant keys/credentials in firebase and/or google developer console where you are to put hashes/fingerprints, put the ones you find there, instead of the ones you get by doing expo fetch:android:hashes.

Also, donā€™t take this for 100% certain, but I think others (who have google sign-in working on IOS but not Android) can test if this is their problem as well by running ā€œexpo build:android -t apkā€ instead of simply ā€œexpo build:androidā€. This, I think, makes it so that stuff in google-services.json isnā€™t replaced, but may come at the cost of stopping google from making the size of your app smaller. But if you test both this and replacing the hashes/fingerprints at once then these two actions may cancel each other out.

I could try to explain better / in more detail if asked.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.