replace mock passport flows with live server integration
CI / test (push) Has been cancelled

Switch the app to the real passport enrollment, dashboard, device, alert, and challenge APIs so it can pair with idp.global and act on server-backed state instead of demo data.
This commit is contained in:
2026-04-20 13:21:39 +00:00
parent 271d9657bf
commit a298b5e421
7 changed files with 1136 additions and 48 deletions
@@ -3,6 +3,9 @@ import Foundation
struct PairingPayloadContext: Equatable {
let deviceName: String
let originHost: String
let pairingToken: String
let challenge: String?
let challengeID: String?
let tokenPreview: String
}
@@ -21,6 +24,9 @@ enum PairingPayloadParser {
return PairingPayloadContext(
deviceName: device,
originHost: origin,
pairingToken: token,
challenge: queryItems.first(where: { $0.name == "challenge" })?.value,
challengeID: queryItems.first(where: { $0.name == "challenge_id" })?.value,
tokenPreview: String(token.suffix(6))
)
}
@@ -29,6 +35,9 @@ enum PairingPayloadParser {
return PairingPayloadContext(
deviceName: "Manual Session",
originHost: "code.foss.global",
pairingToken: trimmedPayload,
challenge: nil,
challengeID: nil,
tokenPreview: String(trimmedPayload.suffix(6))
)
}