Passport: master: HandlesOAuthErrors middleware unable to actually handle errors

Created on 9 Aug 2019  路  2Comments  路  Source: laravel/passport

  • Passport Version: dev-master with commit 7959c6c4d181090de5f064971a9fca035f759513
  • Laravel Version: 5.8.30
  • PHP Version: 7.3.4 (Debian Buster)
  • Database Driver & Version: MySQL 8.0.17

Description:

The new HandlesOAuthErrors middleware is unable to actually handle errors, because Laravel intercepts Exceptions of the final destination of the middleware pipeline:

https://github.com/laravel/framework/blob/9097786caae30e9ca243874e5c807609f1f2728e/src/Illuminate/Pipeline/Pipeline.php#L133

see also my comment in the PR introducing the middleware: https://github.com/laravel/passport/pull/937#issuecomment-519923621

Steps To Reproduce:

Attempt to use Passport within a Laravel application and open /oauth/authorize with an invalid client_id. You'll see an HTTP 500 instead of a proper JSON response explaining the issue.

bug

Most helpful comment

I'm still getting a generic error on passport 8.0

All 2 comments

The PR for this was merged into master.

I'm still getting a generic error on passport 8.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexjose picture alexjose  路  54Comments

SidharthRaveendran picture SidharthRaveendran  路  80Comments

tobecwb picture tobecwb  路  30Comments

JuanDMeGon picture JuanDMeGon  路  29Comments

siarheipashkevich picture siarheipashkevich  路  60Comments