8000 [12.x] Passport 13.x by hafezdivandari · Pull Request #9819 · laravel/docs · GitHub
[go: up one dir, main page]

Skip to content

[12.x] Passport 13.x #9819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
May 1, 2025
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e2e5f88
passport 13.x
hafezdivandari Aug 14, 2024
d4fbeb9
wip
hafezdivandari Aug 14, 2024
97c30da
wip
hafezdivandari Aug 14, 2024
2b23e16
wip
hafezdivandari Aug 14, 2024
0228609
wip
hafezdivandari Aug 18, 2024
8772d98
wip
hafezdivandari Aug 19, 2024
560ce63
wip
hafezdivandari Aug 23, 2024
ac9439b
wip
hafezdivandari Aug 23, 2024
6fc2b04
wip
hafezdivandari Aug 23, 2024
3012b89
wip
hafezdivandari Aug 23, 2024
5f6bc2e
add device code grant
hafezdivandari Aug 24, 2024
7db7d78
wip
hafezdivandari Aug 24, 2024
98b0379
wip
hafezdivandari Aug 25, 2024
f3d7a97
fix a typo on code verifier
hafezdivandari Oct 4, 2024
af419bc
rename CheckClientCredentials middleware
hafezdivandari Oct 4, 2024
cd61de2
fix a typo
hafezdivandari Oct 5, 2024
a0d41b1
fix a typo
hafezdivandari Oct 5, 2024
133bdf6
new `EnsureClientIsResourceOwner` middleware
hafezdivandari Oct 9, 2024
39f5e63
wip
hafezdivandari Oct 10, 2024
56a2daf
formatting
hafezdivandari Nov 20, 2024
cebecd5
Merge branch '11.x' into 11.x-passport-13.x
hafezdivandari Nov 20, 2024
d5feabd
add axios link
hafezdivandari Nov 20, 2024
89d1838
wip
hafezdivandari Nov 30, 2024
5ec4eca
add sections for managing clients and tokens
hafezdivandari Feb 6, 2025
7814bd3
Merge branch 'master' into 11.x-passport-13.x
hafezdivandari Feb 19, 2025
0fefbe7
Merge branch '12.x' into 11.x-passport-13.x
hafezdivandari Mar 7, 2025
8660ed6
formatting
hafezdivandari Mar 7, 2025
8e87177
Merge branch '12.x' into 11.x-passport-13.x
hafezdivandari Mar 7, 2025
da18068
better scope examples
hafezdivandari Mar 9, 2025
6632967
better uri examples
hafezdivandari Mar 9, 2025
d0a51a3
formatting
hafezdivandari Mar 9, 2025
63cfd52
Merge branch '12.x' into 11.x-passport-13.x
hafezdivandari Mar 26, 2025
6931010
formatting
taylorotwell Apr 24, 2025
f5b80d7
add instructions for views
hafezdivandari Apr 25, 2025
137b5e0
formatting
taylorotwell Apr 25, 2025
fd18315
Merge branch '11.x-passport-13.x' of github.com:hafezdivandari/larave…
taylorotwell Apr 25, 2025
6f4e048
formatting
taylorotwell Apr 25, 2025
09274aa
add samples for rendering views with closure
hafezdivandari Apr 25, 2025
8484585
formatting
taylorotwell Apr 29, 2025
02fbdbf
formatting
taylorotwell Apr 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
hafezdivandari committed Oct 10, 2024
commit 39f5e631848b188b28e58777048aab57e681f8cd
5 changes: 2 additions & 3 deletions passport.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ If the state parameter matches, the consumer should issue a `POST` request to yo

The OAuth2 device authorization grant allows browserless or limited input devices, such as TVs and game consoles, to obtain an access token by exchanging a "device code". When using device flow, the device client will instruct the user to use a secondary device, such as a computer or a smartphone and connect to your server where they will enter the provided "user code" and either approve or deny the access request.

To get started, we need to instruct Passport how to return our "user code", "authorization", and "authorization result" views. Remember, Passport is a headless OAuth2 library. If you would like a frontend implementation of Laravel's OAuth features that are already completed for you, you should use an [application starter kit](/docs/{{version}}/starter-kits).
To get started, we need to instruct Passport how to return our "user code" and "authorization" views. Remember, Passport is a headless OAuth2 library. If you would like a frontend implementation of Laravel's OAuth features that are already completed for you, you should use an [application starter kit](/docs/{{version}}/starter-kits).

All the authorization view's rendering logic may be customized using the appropriate methods available via the `Laravel\Passport\Passport` class. Typically, you should call this method from the `boot` method of your application's `App\Providers\AppServiceProvider` class. Passport will take care of defining the routes that returns these views:

Expand All @@ -547,7 +547,6 @@ public function boot(): void
{
Passport::deviceUserCodeView('auth.oauth.device.user-code');
Passport::deviceAuthorizationView('auth.oauth.device.authorize');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, we should tell people what to put in these views.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instruction has been added.

Passport::deviceAuthorizationResultView('auth.oauth.device.authorize-result');

// ...
}
Expand Down Expand Up @@ -1031,7 +1030,7 @@ The `scopes` middleware may be assigned to a route to verify that the incoming r
The `scope` middleware may be assigned to a route to verify that the incoming request's access token has *at least one* of the listed scopes:

Route::get('/orders', function () {
// Access token has either "check-status" or "place-orders" scopes...
// Access token has either "check-status" or "place-orders" scope...
})->middleware(['auth:api', 'scope:check-status,place-orders']);

<a name="checking-scopes-on-a-token-instance"></a>
Expand Down
0