File tree Expand file tree Collapse file tree
composeapp/src/main/java/com/firebase/composeapp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,12 +33,22 @@ import com.google.firebase.FirebaseApp
3333import com.google.firebase.auth.actionCodeSettings
3434
3535class MainActivity : ComponentActivity() {
36+ companion object {
37+ private const val USE_AUTH_EMULATOR = true
38+ private const val AUTH_EMULATOR_HOST = "10.0.2.2"
39+ private const val AUTH_EMULATOR_PORT = 9099
40+ }
41+
3642 override fun onCreate(savedInstanceState: Bundle?) {
3743 super.onCreate(savedInstanceState)
3844
3945 FirebaseApp.initializeApp(applicationContext)
4046 val authUI = FirebaseAuthUI.getInstance()
4147
48+ if (USE_AUTH_EMULATOR) {
49+ authUI.auth.useEmulator(AUTH_EMULATOR_HOST, AUTH_EMULATOR_PORT)
50+ }
51+
4252 val emailLink = intent.getStringExtra(EmailSignInLinkHandlerActivity.EXTRA_EMAIL_LINK)
4353
4454 val configuration = authUIConfiguration {
You can’t perform that action at this time.
0 commit comments