 
 internal enum DeserializationError: Swift.Error {
     case invalidURLScheme
+    case duplicateQueryItem(String)
     case missingFactor
     case invalidFactor(String)
     case invalidCounterValue(String)

        throw DeserializationError.missingFactor
    }

    let algorithm = try queryDictionary[kQueryAlgorithmKey].map(algorithmFromString) ?? defaultAlgorithm
    let digits = try queryDictionary[kQueryDigitsKey].map(parseDigits) ?? defaultDigits
    guard let secret = try externalSecret ?? queryDictionary[kQuerySecretKey].map(parseSecret) else {
        throw DeserializationError.missingSecret
    }
    guard let generator = Generator(factor: factor, secret: secret, algorithm: algorithm, digits: digits) else {

    var name = String(url.path.dropFirst())

    let issuer: String
    if let issuerString = try queryItems.value(for: kQueryIssuerKey) {
        issuer = issuerString
    } else if let separatorRange = name.range(of: ":") {
        // If there is no issuer string, try to extract one from the name
