Skip to content

Commit a5baa48

Browse files
[11.x] Enable passport's password grant type (#9318)
* enable password grant * Update passport.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent d8adbbb commit a5baa48

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

passport.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,16 @@ If the state parameter matches, the consumer should issue a `POST` request to yo
658658
659659
The OAuth2 password grant allows your other first-party clients, such as a mobile application, to obtain an access token using an email address / username and password. This allows you to issue access tokens securely to your first-party clients without requiring your users to go through the entire OAuth2 authorization code redirect flow.
660660

661+
To enable the password grant, call the `enablePasswordGrant` method in the `boot` method of your application's `App\Providers\AppServiceProvider` class:
662+
663+
/**
664+
* Bootstrap any application services.
665+
*/
666+
public function boot(): void
667+
{
668+
Passport::enablePasswordGrant();
669+
}
670+
661671
<a name="creating-a-password-grant-client"></a>
662672
### Creating a Password Grant Client
663673

0 commit comments

Comments
 (0)