Skip to content

Conversation

@mikepitre
Copy link
Collaborator

No description provided.

… guiding goals, module structure, dependency injection strategy, concurrency model, networking stack, testing, and preview support. This document serves as a blueprint for the upcoming refactor, detailing breaking changes and progress milestones.
…onService for revoking sessions, and SessionTokenFetcher for token retrieval. Update documentation to reflect architectural changes and progress in the refactor plan.
…tionDomain, OrganizationMembership, and related services. Implement methods for handling invitations, membership requests, and domain verification. Enhance organization-related functionality with mock data for testing.
…esses, phone numbers, and passkeys. Introduce corresponding services and mock data for testing. Update the refactor plan documentation to reflect these changes and ensure consistency across the codebase.
…ng User, EmailAddress, PhoneNumber, and ExternalAccount. Introduce corresponding service classes for handling user-related operations and enhance the overall architecture with mock data for testing. Update the refactor plan documentation to reflect these additions and ensure alignment with the project's structure.
…g Factor, OAuthProvider, ClerkAPIError, ClerkClientError, and related structures. Introduce telemetry features with TelemetryCollector, TelemetryEnvironment, and TelemetryEvent types for improved monitoring. Enhance user and token management with new resources and mock data for testing. Update documentation to reflect these additions and ensure alignment with the project's structure.
…type safety and modularity. Update methods for creating and managing sign-ins, including support for new authentication strategies and improved API client usage. Ensure compatibility with various platforms and enhance error handling for authentication flows.

# Conflicts:
#	Sources/ClerkKit/Domains/Auth/SignIn/SignInService.swift
… modularity and type safety. Update method signatures for creating, updating, and verifying sign-ups to standardize parameter handling. Adjust documentation to reflect these changes and ensure alignment with the new architecture.
…ethod and related parameters. Update SignInService to handle locale in requests, ensuring it defaults to the user's preferred locale when not provided. Modify tests to validate locale handling in sign-in requests.
…rvice, EnvironmentService, and UserService, enhancing type safety and modularity. Update method signatures for async operations and improve API client usage across services. Document changes in the refactor plan to reflect the ongoing consolidation of dependency injection and service protocols.
…use the updated `TestContainer.reset()` method, improving consistency and maintainability. Update the refactor plan to reflect the completion of the `TestContainer` helper preparation.
…, enhancing modularity and type safety. Update method signatures for organization management operations, ensuring consistent API client usage and improved async handling. Document changes to reflect the new architecture and service protocols.
…fety and modularity across PasskeyService, ClientService, EmailAddressService, ExternalAccountService, and PhoneNumberService. Update method signatures for async operations to ensure consistent API client usage. Document middleware responsibilities in the refactor plan to reflect the new architecture and service protocols.
…rs with a new middleware system, introducing a reusable networking pipeline. Implement various middleware types for request preparation, response validation, and error handling, enhancing modularity and maintainability. Update tests to validate the new middleware functionality and document changes in the refactor plan.
…on retry mechanism, allowing for improved error handling during authentication. Update the networking pipeline to include the new retry middleware and implement comprehensive tests to validate middleware functionality, including request/response handling and error scenarios. Document changes in the refactor plan to reflect these enhancements.
Introduce ClerkRequestLoggingMiddleware and ClerkRateLimitRetryMiddleware to enhance request/response logging and implement retry logic for rate-limited responses and transient errors. Update the networking pipeline to include these new middleware components and add tests to validate their functionality, ensuring robust error handling and improved debugging capabilities. Document changes in the refactor plan to reflect these enhancements.
Enhance the networking middleware by simplifying the logging mechanism in ClerkRequestLoggingMiddleware and improving the retry logic in ClerkRateLimitRetryMiddleware. Introduce testing hooks in TelemetryCollector for debugging purposes and clean up the TelemetryEvents enum. Update the refactor plan to reflect these changes, ensuring better maintainability and debugging capabilities.
Change the access level of mock data properties across various domains in ClerkKit to `package` scope, allowing shared access among targets while keeping them hidden from the public API. Introduce `PreviewMocks` helpers in `ClerkKitUI` for SwiftUI previews, ensuring realistic data rendering without exposing internal structures. Update the refactor plan to reflect these changes.
…ation

Eliminate the `Get` dependency from the project, transitioning to a custom `APIClient` built on async `URLSession` and the existing middleware stack. Update various services to utilize the new client, ensuring consistent API interactions. Adjust the refactor plan to document these architectural changes and improvements in the networking layer.
… conformance to various parameter objects, improving concurrency safety in authentication processes.
…n ClerkKit. Update keychain registration in TestContainer to use InMemoryKeychain for testing. Adjust dependencies in Package.swift and Clerk.swift to reflect these changes, enhancing modularity and testability.
…, enhancing visibility and usability across modules. This change includes updating the `AuthConfig`, `CommerceSettings`, `DisplayConfig`, `Environment`, `FraudSettings`, `UserSettings`, and telemetry-related structures to ensure they are accessible where needed, while maintaining internal encapsulation. Additionally, adjust the `SignIn` method to `package` scope for better modularity.
…te RefactorPlan to reflect the streamlined dependencies for ClerkKit, enhancing clarity and focus on essential components.
…nts, enhancing performance and consistency. Update Package.swift to remove Kingfisher dependency and add NukeUI where necessary. Adjust image loading logic across various views to utilize LazyImage for improved loading behavior.
…lity and clarity. Update various components to access configuration settings through the new options structure, ensuring consistent behavior across authentication and telemetry functionalities. This change includes the introduction of ClerkOptions to manage settings like debug mode and telemetry collection, improving overall modularity and maintainability.
- Updated `.swiftlint.yml` to allow nested types and exclude Tests from linting.
- Introduced a `createTelemetryCollector` method in `DependencyContainer` to streamline telemetry collector initialization.
- Refactored `OAuthProvider` to use camelCase for `linkedinOidc` and updated related references.
- Improved error handling in `SignInFactorCodeView` by extracting verification logic into dedicated methods.
- Simplified image data appending in `OrganizationService` and `UserService` using `Data` initializers.
- Enhanced logging in `ClerkLogger` by introducing a `LogLocation` struct for better context.
- Updated various UI components to handle asynchronous tasks more safely with optional error handling.
- Refactored `Color` extension to improve readability and maintainability.
- Cleaned up SwiftLint disable comments for better code clarity.
- Created a new `.vscode/extensions.json` file to recommend extensions for Swift development, including `vknabel.vscode-swiftformat` and `flowdeck.flowdeck`.
- Updated `.vscode/settings.json` to set `vknabel.vscode-swiftformat` as the default formatter for Swift files, enhancing code formatting consistency.
- Revised the README files for the Examples directory to improve clarity and organization.
- Changed section titles from "Structure" to "Available Examples" and "Opening Examples" to "Running Examples" for better alignment with user expectations.
- Enhanced instructions in the Quickstart and WatchExampleApp READMEs, specifying the location of the `QuickstartApp.swift` file and emphasizing the need to replace the publishable key.
- Streamlined the WatchExampleApp README by removing redundant details and focusing on essential setup and running instructions.
- Removed conditional build logic for macOS and consolidated build commands for all platforms.
- Updated destination settings for macOS to ensure correct build configuration.
- Enhanced clarity in the CI configuration for better maintainability.
…n state sync

- Updated documentation to specify that authentication state syncs bidirectionally between the iOS and watchOS apps.
- Revised setup instructions to reflect the new two-way sync functionality, ensuring clarity on how both apps handle authentication state.
- Clarified that frontendApiUrl is derived from the publishable key for passkey authentication, emphasizing the need for the original Clerk domain as the relying party identifier, even when using a proxy.
- Renamed methods to clarify their purpose, changing from "enabled" to "required" for better readability.
- Updated logic to ensure that only required fields are considered for focus and validation during the sign-up process.
- Enhanced the handling of empty fields and focus management to align with the new requirement checks.
…ProfileView for legal acceptance

- Introduced LegalConsentView for managing user agreement to terms and privacy policies during sign-up.
- Added SafariView for displaying external links in a Safari-style interface.
- Updated SignUpCompleteProfileView to include legal consent handling, ensuring users acknowledge terms before proceeding.
- Refactored field validation methods for clarity and consistency in checking required fields.
- Improved the pre-commit hook to handle staged Swift files more safely by using null-delimited input, preventing issues with special characters in filenames.
- Added a temporary file to store filtered Swift files, ensuring efficient processing.
- Updated the formatting and re-staging commands to utilize the new handling method, enhancing reliability.
- Added translations for the phrase " and " in multiple languages, enhancing localization support.
- Revised various Portuguese translations for clarity and consistency, including phrases related to account management and verification.
- Introduced new entries for "Privacy Policy," "Terms of Service," and "Success" to ensure comprehensive localization coverage.
- Made minor adjustments to existing translations for better readability and accuracy.
…tance

- Updated AuthState to utilize a new GetHelpView for both sign-in and sign-up help contexts, replacing the previous SignInGetHelpView.
- Enhanced the handleFieldToCollect method to include logic for determining when to show the GetHelpView based on profile completion status.
- Added a new GetHelpView component to provide users with support options during authentication processes.
- Updated SignUp extension to include a method for checking if all required fields are present for profile completion.
…guages

- Introduced a new localized string for users experiencing issues with account creation, providing guidance via email support.
- Added translations for this message in Arabic, German, Greek, Spanish, French, Hindi, Italian, Japanese, Korean, Simplified Chinese, and Portuguese to enhance user experience across diverse languages.
- Ensured comprehensive localization coverage to assist users effectively during the registration process.
- Updated SignUp model to replace String arrays for required, optional, missing, and unverified fields with SignUpField enum, enhancing type safety and maintainability.
- Introduced SignUpField enum to represent various sign-up fields, allowing for better handling of unknown values and forward compatibility.
- Modified related methods and extensions to accommodate the new SignUpField type, ensuring consistent usage throughout the codebase.
- Enhanced sorting and priority handling for sign-up fields, improving the overall logic for field management during the sign-up process.
- Updated Factor model to replace String with FactorStrategy enum, enhancing type safety and maintainability in the authentication process.
- Introduced FactorStrategy enum to represent various factor verification strategies, allowing for better handling of unknown values and forward compatibility.
- Modified related methods and extensions to accommodate the new FactorStrategy type, ensuring consistent usage throughout the codebase.
- Updated UI components to reflect changes in factor strategy handling, improving overall clarity and functionality in the sign-in and sign-up processes.
- Updated FactorStrategy and SignUpField initializers to disable cyclomatic complexity warnings, enhancing code maintainability.
- Refactored Clerk preview setup to streamline environment loading and dependency injection, improving mock service configuration.
- Adjusted AuthStartView to utilize enum values for strategy checks, enhancing type safety in authentication flows.
- Cleaned up SignUpCollectFieldView by removing unnecessary optional field checks, simplifying the view logic.
…ype safety

- Updated the Verification struct to replace the strategy property from String to FactorStrategy, enhancing type safety and maintainability.
- Modified mock verification instances to utilize the new FactorStrategy enum values, ensuring consistency across the codebase.
- Updated the performLog method to include a forceLog parameter, allowing for immediate logging of errors.
- Enhanced log message formatting to indicate when a message is forcefully logged, improving debugging visibility.
- Removed debug logging configuration from QuickstartApp initialization for cleaner setup.
- Updated various authentication-related structs (Factor, TOTPResource, Verification, BackupCodeResource, Passkey, Session, SignIn, SignUp) to remove unnecessary Hashable conformance, enhancing type safety and maintainability.
- Enhanced the Verification and SessionStatus enums to include associated values for unknown states, allowing for better handling of unexpected values.
- Streamlined the SignInIdentifier and SignUpStatus enums by removing redundant Hashable conformance, simplifying the code structure.
- Adjusted related methods and extensions to accommodate these changes, ensuring consistent usage throughout the codebase.
- Updated the task handling in QuickstartApp and WatchExampleApp to include error handling with a do-catch block, improving error visibility by dumping errors to the console.
- Removed the commerceSettings property from the Clerk environment, simplifying the isEmpty check and related mock models.
- Cleaned up the Environment+Ext.swift file by removing the billingIsEnabled property, enhancing clarity in the environment configuration.
- Incremented sdkVersion from "0.71.1" to "0.71.2" for the latest release.
- Updated apiVersion from "2025-04-10" to "2025-11-10" to align with upcoming API changes.
- Updated `.gitignore` to include `.env` file for environment variable management.
- Modified `CONTRIBUTING.md` to document the creation of the `.env` file during setup and added details on running unit and integration tests.
- Expanded `Makefile` to include commands for running unit and integration tests, along with a new target for creating the `.env` file.
- Updated CI workflow to run both unit and integration tests, ensuring proper environment configuration.
- Introduced integration test helpers and added integration tests for the Environment domain, verifying API interactions.
- Simplified the Clerk configuration in QuickstartApp by removing unnecessary options.
- Updated the passwordIsEnabled property in Environment+Ext.swift to reduce visibility, enhancing encapsulation.
- No changes made to version numbers in Version.swift, maintaining current SDK and API versions.
- Removed debug log level from Clerk configuration for cleaner setup.
- Replaced the hardcoded publishable key with a placeholder for security and clarity.
@mikepitre mikepitre closed this Nov 25, 2025
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.

2 participants