Skip to content
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

[5.7] Passport: clarify JSON API usage #4652

Closed
wants to merge 1 commit into from
Closed

[5.7] Passport: clarify JSON API usage #4652

wants to merge 1 commit into from

Conversation

driesvints
Copy link
Member

There seems to be a lot of confusion about the JSON API that ships with Passport:

laravel/passport#839
laravel/passport#371
laravel/passport#842

The JSON API is guarded by the web and auth middlewares which means that they can only be consumed by the application they're implemented in. In most situations this works well but when you try to consume the API externally or from a subdomain it becomes cumbersome.

It would be better if the JSON API would behave as an actual api without having to go through all of the web middlewares and just use the auth:api middleware for authentication. There's a feature request open for this: laravel/passport#379

In the meantime we can add some clarification to the docs for people struggling with this.

There seems to be a lot of confusion about the JSON API that ships with Passport:

laravel/passport#839
laravel/passport#371
laravel/passport#842

The JSON API is guarded by the web and auth middlewares which means that they can only be consumed by the application they're implemented in. In most situations this works well but when you try to consume the API externally or from a subdomain it becomes cumbersome.

It would be better if the JSON API would behave as an actual api without having to go through all of the web middlewares and just use the auth:api middleware for authentication. There's a feature request open for this:

laravel/passport#379

In the meantime we can add some clarification to the docs for people struggling with this.
@driesvints driesvints changed the title [5.7] Clarify JSON API usage [5.7] Passport: clarify JSON API usage Oct 19, 2018
@taylorotwell
Copy link
Member

As mentioned in a previous PR, we can't have back to back notes. The documentation will have to be worked into the flow of the document.

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.

2 participants