Building Snook-A-Look in Kotlin Multiplatform meant sharing as much UI and business logic as possible. But when it came to authentication, we hit a classic platform disparity: Apple Sign-In. On iOS, it's a breeze with native APIs. On Android, it's a completely different beast involving OAuth web flows.
We didn't want to pollute our shared Compose UI with platform-specific auth logic. We needed a clean expect/actual bridge that could seamlessly suspend a KMP coroutine, launch the web flow on Android, and resume the KMP coroutine with the auth payload.
Here is exactly how we engineered a resilient Apple Sign-In flow on Android using Chrome Custom Tabs and Kotlin Coroutines.