                       let bitidIndex = Int(bii) else {
                 return BRHTTPResponse(request: request, code: 400)
             }
+            if let response = self.tempBitIDResponses[stringToSign] {
+                return BRHTTPResponse(request: request, code: response)
+            }
             let asyncResp = BRHTTPResponse(async: request)
             DispatchQueue.main.sync {
                 CFRunLoopPerformBlock(RunLoop.main.getCFRunLoop(), CFRunLoopMode.commonModes.rawValue) {

                                    self?.addKeyToCache(key, url: url)
                                    self?.sendBitIDResponse(stringToSign, usingKey: key, request: request, asyncResp: asyncResp)
                                } else {
                                    request.queue.async { asyncResp.provide(401) }
                                }
                            case .cancelled:
                                request.queue.async { asyncResp.provide(403) }
                            case .failed:
                                request.queue.async { asyncResp.provide(401) }
                            }
                        }))

    let walletManager: WalletManager
    let store: Store
    var tempBitIDKeys = [String: BRKey]() // this should only ever be mutated from the main thread
    private var tempBitIDResponses = [String: Int]()
    private var isPresentingAuth = false

    init(walletManager: WalletManager, store: Store) {
