init(_:reason:context:result:)
Creates a local authentication view with a localizable title.
Declaration
@MainActor @preconcurrency init(_ titleKey: LocalizedStringKey, reason: Text, context: LAContext? = nil, result: @escaping (Result<Void, any Error>) -> Void) where Label == TextParameters
- titleKey:
A localized title that displays below the authentication view.
- reason:
A localized reason that describes why your app presents an authentication prompt to the user.
- context:
A context used to evaluate authentication policies. If
nil, the system creates one. - result:
A closure to call when the authentication succeeds or fails.
resultA Result instance that indicates success or failure with a reason.