This release introduces support for legacy sign-in recovery flows, separates email/password and email link sign-in configurations, improves localization fallback resiliency, and refines error propagation during account conflicts.
🚀 New Features & API Enhancements
Legacy Sign-In Recovery Flow
- Added support for retrieving alternative sign-in methods for an email address during authentication errors or account conflicts, letting users recover or switch to their active credentials smoothly.
- New Configuration Property:
legacyFetchSignInWithEmail: Booladded toAuthConfiguration(defaults tofalse). - New Public Models:
LegacySignInOption– represents an alternative sign-in method/provider.LegacySignInRecoveryContext– context holding details for alternative sign-in options and unavailable providers.
- New Public API Methods:
AuthService.renderLegacyRecoveryButtons(spacing:) -> AnyView– renders buttons for the legacy sign-in recovery options.
- New Public Errors:
- Added
AuthServiceError.legacySignInRecoveryPresentedto handle view-state transitions when recovery options are displayed.
- Added
Separated Email Sign-In Configurations
- Distinctly split Email/Password and Email Link sign-in configuration methods in
AuthService:withEmailSignIn()now strictly enables inline Email & Password sign-in within theAuthPickerView.- Introduced
withEmailLinkSignIn()andwithEmailLinkSignIn(onTap:)to configure and trigger Email Link (Passwordless) sign-in as a distinct option.
🛠️ Behavioral Changes & Bug Fixes
Resilient String Customization & Fallback
- Enhanced
StringUtilslocalization mechanism. If a customBundleis supplied viaAuthConfiguration(customStringsBundle:)but does not override all strings, the library now seamlessly falls back to the default package strings inBundle.modulerather than rendering empty fields or raw keys.
Improved Conflict & Error Handling
- Standardized the event order in external provider authentication buttons (
Apple,Google,Facebook,Twitter,OAuth). The customaccountConflictHandleris now executed before general error reporting (reportError). This prevents resolved/handled account conflicts from bubbling up as generic errors. - Multi-Factor Authentication (MFA) Management buttons are now hidden automatically if MFA is disabled in
AuthConfiguration. - Resolved potential SwiftUI actor isolation issues by marking the following public view structs with
@MainActor:EmailLinkViewPasswordRecoveryView