Decouple sending code and entering code in passwordless authentication

Using passwordless connection and universal login, i could enter my email and send one-time-code. Now instead of showing ‘enter code’ input box, i want to redirect users to my application page for some survey. After user finishes the survey, he is redirected back to ‘enter code’ input box where he enters code and finishes authentication.

How can we do this?