Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Real/RealAuthorizationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ final public class RealAuthorizationController: AuthorizationControllerProtocol,

@MainActor
public func signalAllAcceptedCredentials(rpID: String, userHandle: Data, acceptedCredentialIDs: [Data]) async throws(AuthorizationError) {
if #available(iOS 26.0, *) {
if #available(iOS 26.0, macOS 26.0, *) {
let credentialUpdater = ASCredentialUpdater()
do {
try await credentialUpdater.reportAllAcceptedPublicKeyCredentials(
Expand Down
10 changes: 9 additions & 1 deletion Sources/SimpleAuthenticationServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,17 @@ public enum AuthorizationErrorType: String, Equatable, Sendable, Codable {
public struct AuthorizationError: Error, LocalizedError, Sendable {
public let type: AuthorizationErrorType
public let originalError: Error?

public init(type: AuthorizationErrorType, originalError: Error? = nil) {
self.type = type
self.originalError = originalError
}

public var errorDescription: String? {
guard let originalError else {
return "AuthorizationError(type: \(type.rawValue))"
}

return "AuthorizationError(type: \(type.rawValue), originalError: \(String(describing: originalError)))"
}
}
Loading