Skip to content

[13.x] Add an option to disable device code grant#1842

Merged
taylorotwell merged 3 commits intolaravel:13.xfrom
hafezdivandari:13.x-option-to-disable-device-grant
Aug 6, 2025
Merged

[13.x] Add an option to disable device code grant#1842
taylorotwell merged 3 commits intolaravel:13.xfrom
hafezdivandari:13.x-option-to-disable-device-grant

Conversation

@hafezdivandari
Copy link
Copy Markdown
Contributor

Fixes #1836

This PR adds an option property to the Passport class that allows disabling the "Device Code" grant. This is useful in applications where the grant is not needed, allowing you to avoid registering its routes, views, and enabling the grant unnecessarily.

You may disable this grant by adding the following line to the boot method of your application's AppServiceProvider class:

Passport::$deviceCodeGrantEnabled = false;

@taylorotwell taylorotwell merged commit 1507155 into laravel:13.x Aug 6, 2025
8 checks passed
@hafezdivandari hafezdivandari deleted the 13.x-option-to-disable-device-grant branch August 6, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Target [Laravel\Passport\Contracts\DeviceUserCodeViewResponse] is not instantiable.

2 participants