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

ghost picture ghost  ·  3Comments

soubhikchatterjee picture soubhikchatterjee  ·  4Comments

parth-vora-7 picture parth-vora-7  ·  4Comments

duccanh0022 picture duccanh0022  ·  3Comments

huiyonghkw picture huiyonghkw  ·  3Comments