When using the code authentication flow, a bad value currently crashes the library which leads to a HTTP 500 response bubbling up. This is inconsistent with the access token authentication flow which instead return a HTTP 400 response for a bad value.
This pull request fixes the inconsistency by returning a HTTP 400 response when the authentication code is rejected by the social provider.
When using the code authentication flow, a bad value currently crashes the library which leads to a HTTP 500 response bubbling up. This is inconsistent with the access token authentication flow which instead return a HTTP 400 response for a bad value.
This pull request fixes the inconsistency by returning a HTTP 400 response when the authentication code is rejected by the social provider.