How to deal with expired `state` in login uri?

Yes, I was referring specifically to the login page when I talked about inactivity. I apologize for the misunderstanding.

While it does not solve the problem entirely, the alternative I mentioned let’s the user know that their session is about to expire.