laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.

Home Page:https://laravel.com/docs/passport

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot Custom Handle `Laravel\Passport\Exceptions\OAuthServerException` in Laravel 11

rulim34 opened this issue · comments

Passport Version

12.2.0

Laravel Version

11.10.0

PHP Version

8.2.19

Database Driver & Version

MariaDB docker

Description

I tried to custom render Laravel\Passport\Exceptions\OAuthServerException on Laravel 11 as per the documentation. But it doesn't work and just return the default JSON response.
image
image
image

Steps To Reproduce

  1. Install Laravel 11
  2. Install Passport 12
  3. Setup custom render

Heya, thanks for reporting.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here? Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Please do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

I wonder what happened here because this should be possible after @matt-allan's PR here: #1066. But maybe something broke with Laravel 11. Would appreciate any help here...

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

You may check PR #1763

@rulim34 #1763 was merged into https://github.com/laravel/passport/tree/13.x two days ago. Can you close this issue?