Set a one-time code up on the server's set-up page, as a person with an authenticator app does: "Unable to scan?" shows the key, the app gives the code of that key, the code and a device name go in, "Submit". The key is kept for the scenario: "I enter the one-time code of "…"" works its codes out. The clean-up deletes the code set up after the scenario.
Then I should be back in the app
Examples
When I set up a one-time code named "Test laptop"
When we set up a one-time code named "Test laptop"
When I set up a one-time code named "Work phone"
When I set up a one-time code named "Test laptop"
When I set up a one-time code named ""
Pattern
When(/^(?:I|we) set up a one-time code named "([^"]*)"$/, …)
Part of @webship-js/keycloak-steps (github.com/webship/keycloak-steps), a step pack for Webship-js 2.0.x.