This is an attempt to fix #3089 following the strategy introduced in d625e41c6c, although that strategy by itself does not seem to be sufficient. What needs be done is honouring the redirect_url query parameter from the auth router.
d625e41c6c