Skip to content

Conversation

@swolfand
Copy link
Collaborator

This pull request introduces a new sample project, custom-flows, demonstrating various custom flows for user authentication and management using the Clerk SDK. It includes updates to dependencies, project configuration, and the addition of several new files for activities, view models, and other application components.

Project Setup and Configuration Changes:

  • Dependency Updates: Added new dependencies for AndroidX libraries (coreKtx, junit, espressoCore) and Compose testing libraries (ui-test-manifest, ui-test-junit4) in gradle/libs.versions.toml. [1] [2]
  • Build Configuration: Added build.gradle.kts for the custom-flows sample project, configuring plugins, Android settings (e.g., namespace, compileSdk, minSdk), and dependencies.
  • ProGuard Rules: Added a proguard-rules.pro file with placeholders for project-specific rules.
  • Gitignore Update: Added /build to .gitignore for the custom-flows sample project.

Application Structure:

  • Application Class: Added CustomFlowsApplication.kt to initialize the Clerk SDK with a test publishable key and debug mode enabled.
  • Android Manifest: Added AndroidManifest.xml defining permissions, application metadata, and activities for various flows (e.g., sign-in, sign-up, MFA, OAuth, etc.).

Main Activity and ViewModel:

  • Main Activity: Implemented MainActivity.kt to handle signed-in and signed-out states, displaying buttons for launching custom flows like adding email/phone, signing in, signing up, etc.
  • Main ViewModel: Added MainViewModel.kt to manage UI state based on Clerk initialization and user authentication status. Includes sign-out functionality.

Custom Flow Implementations:

  • Add Email Flow:
    • Activity: Added AddEmailActivity.kt to handle email address creation and verification.
    • ViewModel: Added AddEmailViewModel.kt to manage the state and logic for adding and verifying email addresses.
  • Add Phone Flow:
    • Activity: Added AddPhoneActivity.kt to handle phone number creation and verification.
    • ViewModel: Added AddPhoneViewModel.kt to manage the state and logic for adding and verifying phone numbers.

@linear
Copy link

linear bot commented Jul 24, 2025

@swolfand swolfand merged commit 5b73d70 into main Jul 24, 2025
3 of 4 checks passed
@swolfand swolfand deleted the sam/mobile-97-android-create-custom-flow-repository branch July 24, 2025 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant