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 #4671

Merged
merged 1 commit into from
Oct 23, 2018
Merged

[5.7] Passport: clarify JSON API usage #4671

merged 1 commit into from
Oct 23, 2018

Conversation

driesvints
Copy link
Member

This is a resend for #4652 now that we can have back to back notes.

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 23, 2018
@taylorotwell taylorotwell merged commit cb0ed77 into laravel:5.7 Oct 23, 2018
@driesvints driesvints deleted the passport-clarify-json-api branch November 26, 2018 13:21
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