Depends entirely on what sort of app you’re running. If it’s a webapp you can set it so that regardless of what page the user requests, if their session is invalid just redirect them to the Twitch auth page. you can even use the state param so that after logging in (which can be automatic if they’re still connected) be sent right back to the page they was originally trying to get to.
If you aren’t developing a webapp, and are using some other program, then there must be some way for the client to know that their session is invalid and that they need to log in again.