Skip to content

Commit

Permalink
Update passport.md
Browse files Browse the repository at this point in the history
  • Loading branch information
laurencei authored Feb 11, 2018
1 parent 1d59c0b commit a574feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion passport.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ Once an access token authenticated request has entered your application, you may

When building an API, it can be extremely useful to be able to consume your own API from your JavaScript application. This approach to API development allows your own application to consume the same API that you are sharing with the world. The same API may be consumed by your web application, mobile applications, third-party applications, and any SDKs that you may publish on various package managers.

Typically, if you want to consume your API from your JavaScript application, you would need to manually send an access token to the application and pass it with each request to your application. However, Passport includes a middleware that can handle this for you. All you need to do is add the `CreateFreshApiToken` middleware to your `web` middleware group:
Typically, if you want to consume your API from your JavaScript application, you would need to manually send an access token to the application and pass it with each request to your application. However, Passport includes a middleware that can handle this for you. All you need to do is add the `CreateFreshApiToken` middleware to your `web` middleware group in your `app/Http/Kernel.php` file:

'web' => [
// Other middleware...
Expand Down

0 comments on commit a574feb

Please sign in to comment.