getIntent

fun getIntent(context: Context, nodeId: String, @DrawableRes image: Int, topMessage: String, bottomMessage: String, positiveButtonLabel: String? = null, negativeButtonLabel: String? = null): Intent

Returns the Intent to display a sign-in prompt to the user.

This can be used in Compose with rememberLauncherForActivityResult and ActivityResultLauncher.launch:

val launcher = rememberLauncherForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
// user pushed sign-in!
}
}

launcher.launch(signInPrompt.getIntent(/*params*/))

It can also be used directly in an ComponentActivity with ComponentActivity.registerForActivityResult:

 val launcher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
// user pushed sign-in!
}
}

launcher.launch(signInPrompt.getIntent(/*params*/))