@@ -70,8 +70,8 @@ import java.util.concurrent.atomic.AtomicBoolean
7070 * is AuthState.Error -> {
7171 * // Handle error
7272 * }
73- * is AuthState.Cancelled -> {
74- * // User cancelled
73+ * is AuthState.Finished -> {
74+ * // Flow was ended via authController.cancel()
7575 * }
7676 * else -> {}
7777 * }
@@ -93,7 +93,7 @@ import java.util.concurrent.atomic.AtomicBoolean
9393 * **Lifecycle Management:**
9494 * - [createIntent] - Generate Intent to start the auth flow Activity
9595 * - [start] - Alternative to launch the flow (for Activity context)
96- * - [cancel] - Cancel the ongoing auth flow, transitions to [AuthState.Cancelled ]
96+ * - [cancel] - End the ongoing auth flow, transitions to [AuthState.Finished ]
9797 * - [dispose] - Release all resources (coroutines, listeners). Call in onDestroy()
9898 *
9999 * @property authUI The [FirebaseAuthUI] instance managing authentication
@@ -120,7 +120,8 @@ class AuthFlowController internal constructor(
120120 * - [AuthState.Loading] - Authentication in progress
121121 * - [AuthState.Success] - User signed in successfully
122122 * - [AuthState.Error] - Authentication error occurred
123- * - [AuthState.Cancelled] - User cancelled the flow
123+ * - [AuthState.Cancelled] - User cancelled a single sign-in attempt, flow stays open
124+ * - [AuthState.Finished] - Flow was ended via [cancel]
124125 * - [AuthState.RequiresMfa] - Multi-factor authentication required
125126 * - [AuthState.RequiresEmailVerification] - Email verification required
126127 */
@@ -195,7 +196,7 @@ class AuthFlowController internal constructor(
195196 /* *
196197 * Cancels the ongoing authentication flow.
197198 *
198- * This method transitions the auth state to [AuthState.Cancelled ] and
199+ * This method transitions the auth state to [AuthState.Finished ] and
199200 * signals the auth flow to terminate. The auth flow Activity will finish
200201 * and return [Activity.RESULT_CANCELED].
201202 *
@@ -211,7 +212,7 @@ class AuthFlowController internal constructor(
211212 */
212213 fun cancel () {
213214 checkNotDisposed()
214- authUI.updateAuthState(AuthState .Cancelled )
215+ authUI.updateAuthState(AuthState .Finished )
215216 }
216217
217218 /* *
0 commit comments