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

Oh, my bad. That is correct. The New Universal Login page cannot be customized with code. If you were to add the custom JavaScript, it would change to the Classic Login. That doesn’t leave you with an option to change the behaviour, sorry for misguiding you!