BadRequestError: state mismatch

Thanks for sharing. I don’t see any glaring issues here (although it appears you are using your client_secret as the generic app secret, which is not recommended).

I’m not seeing other reports of this issue, which leads me to believe this is isolated to your application. Is there any other info you can provide? What changed when you started seeing this error?