Our great sponsors
-
KaMPKit
KaMP Kit by Touchlab. A collection of code & tools designed to get your mobile team started quickly w/Kotlin Multiplatform
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
override fun onActivityResult( requestCode: Int, resultCode: Int, data: Intent? ) { loginViewModel .callbackManager .onActivityResult(requestCode, resultCode, data) // onActivityResult() is deprecated, // but Facebook hasn't added support for // the new Activity Contracts API yet. // https://github.com/facebook/facebook-android-sdk/issues/875 super.onActivityResult(requestCode, resultCode, data) }
I recently started using Google One Tap and Facebook login for some auth work for one of our clients at Touchlab, and wanted to make sure I was using the recommended best practices using coroutines and the new Activity Result API. This was trickier than I realized, because the docs for Google One Tap are out of date, and the API for Facebook login is out of date. So after figuring it out, I wanted to share some code snippets for my future self, and I hope you get something useful from it as well.