Could not resolve token provider

i have create a prelogin app , i want if my
condition in hook’s callback , was not true , user redirect to login
page and show a message to user, please please please help , thanks

currently not possible I think, see https://github.com/owncloud/core/issues/13814