pub fn wait(
t: &dyn Transport,
p: &Provider,
code: &DeviceCode,
sleep: &mut dyn FnMut(Duration),
now: &dyn Fn() -> u64,
cancelled: &dyn Fn() -> bool,
) -> Result<Tokens, Failure>Expand description
Step 2: poll until the person approves, the code expires or the request is denied. sleep and now are the app’s
(tests pass a recorder and a counter), cancelled lets the window close the wait.