I built a flask app that logs in to discord using oauth2 and displays the users username and profile picture. I followed the example https://docs.authlib.org/en/latest/client/frameworks.html#using-oauth-2-0-to-log-in and customized it with discord oauth information.
yet I kept getting an invalid_client
exception thrown by authlib even though my program was correct
I wanted to leave this out there in case someone else runs into the same problem:
authlib will throw invalid_client
if your client secret is wrong too. I had misconfigured my client secret which caused authlib to throw this generic error