Firebase Authentication allows you to authenticate using auth tokens from other sign in providers (Facebook, Twitter etc). My app is intended to release on iOS and Android. I figured that authenticating with Google and Apple would give me a 99% coverage of all potential users. So far I have found that authenticating users with Google in Unity is a dreadful experience.
https://firebase.google.com/docs/auth/unity/google-signin The Firebase guide about Google auth only gives a guide on how to exchange the Google auth token for a Firebase auth token. Unlike the pages for other Firebase auth providers it doesn't even give a hint as to how you can acquire the Google auth token in the first place, not even mentioning a possible plugin.
https://github.com/googlesamples/google-signin-unity There is a project online that lets a user log in to Google with a Unity project. However, sign in is only possible when the project has been built and run on iOS or Android, it is not possible in the editor. Particularly for iOS, this makes development exhausting. A helpful user posted a workaround so it can run in the editor but this solution seems out of date. If Google was serious about supporting Google sign in it would have added this functionality a long time ago. As it is the project has not been updated in over a year.
https://github.com/playgameservices/play-games-plugin-for-unity Google does seem to be actively developing the Google Play Games api for Unity. However, it no longer supports iOS. Moreover, my app is not a game and this could cause some confusion. I would like users to be able to log into my app with any Google account, not just the current Play Games account.
I'm not sure what to do from here. My searches are growing less and less fruitful. Google does not seem to want developers to be able to implement a sign in solution. Meanwhile Apple is forcefully making their new sign in solution a condition of app store approval. I don't know what to do. Can anybody help?
Stay organized with collections Save and categorize content based on your preferences. Google's official packages for Unity extend the default capabilities of Unity, enabling you to optimize game performance, reach new users, understand user behavior, and more.
You need to have a Google developer account (which requires one-time payment of $25). After setting up your account, you can start adding and publishing your applications to Google Play.
Leaving an answer because I could not leave a comment. It might not be an ideal solution for some but definitely a working one. I used PassportJS in my applications to authenticate user sign in.
You can expire this device id from database when a user is logged in to allow a different user to login into same device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With