Does anyone know of any examples that use Firebase Authentication in pure compose? I'm having a difficult time building it from scratch without finding any concrete examples as the examples all(including docs) utilize multiple activities, xml, & have deprecated functions (i.e
onActivityResult
). Perhaps it's better to interop and utilize multiple acitivites and break the app from being pure Compose? Any guidance/advice is greatly appreciated!
i
Ian Lake
04/07/2021, 10:21 PM
FWIW, the Activity Compose artifact allows you to use the Activity Result APIs from Compose (via the just recently renamed
rememberLauncherForActivityResult()
method), which is what allows you to do `startActivityForResult()`/`onActivityResult()` all within your Composable
Thanks Ian & Chris. Perhaps I'm a bit ahead of myself on this one. Been stumped on it for the past week & may just wait until some samples come out on github before continuing with login/authorization. I'll try using auth outside of Compose until then. Appreciate the help!! šā
i
Ian Lake
04/09/2021, 2:45 AM
Maybe try playing around with the Activity Result API outside of Compose, following the guide (https://developer.android.com/training/basics/intents/result), and then adapt that code to Compose afterwards. That'll help you break your dependency on `startActivityForResult()`+