Oauth2_Generic issue

I click the ‘Oauth2 Generic’ button to authorize by my own oauth2 provider server and redirect with the code,it seems all good,but it appears this error and stuck with the sign in page.The server side has no error log output.What’s going on?

The error shows like this:Could not authenticate you from OAuth2Generic because “”.
There is the picture for the network activities:

Somebody help,thanks!