Yes, there is a consent interception script. You can even implement a multi-step consent workflow. It's a new feature, so there is not tons of documentation. But the interception script is "front-channel" (i.e. it requires browser interaction with the person), so it's very similar to writing an authentication interception script.