Not sure if this is just using Laravel Valet or not.
Fresh install with laravel installer on Mac OS X El Capitan
"laravel/framework": "5.3.*",
"laravel/passport": "^1.0"
When doing valet secure on my project directory Vue Components for passport fail because all JSON responses are returned unparsed. Laravel returns the same output with either protocol so I was thinking it was something in vue-resource causing it, but I could never determine the cause.
I was able to fix the issue on https by wrapping all response.data references with JSON.parse()
Screenshot of unparsed client json string:

That isn't actually a passport error at all. It's an old Vue Resource error. You can solve it by one of two things (if memory serves me correctly), you can update to the newest vue-resource package (1.0.*) or you can create a custom interceptor to check if the response body is text or an object, then use JSON.parse if necessary.
Edit: This was the issue here which like I said was fixed in 1.0
Thanks, updating vue-resource did it for me.
@Townfolio Updating did fix that issue, but now when I POST (add/delete token) it returns a crsf token mismatch error. Do you know why that is? I tried modifying some of the session configs regarding HTTPS but that didn't seem to help.
@jordonbaade Ah yes, one more little gotcha when upgrading to 1.0 with vue-resource. So in @taylorotwell's example in the Laravel docs, we have the following.
Vue.http.interceptors.push((request, next) => {
request.headers['X-CSRF-TOKEN'] = Laravel.csrfToken;
next();
});
That worked perfectly in < 1.0, but now, you have to set the header like this.
Vue.http.interceptors.push((request, next) => {
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
next();
});
Of course that Laravel.csrfToken is just an external object you create if you didn't already know that. I believe the vue-resource documentation doesn't even have this, it was only mentioned in this issue vuejs/vue-resource#412 just a couple days ago, anyway, hope that helps you out! If not, let me know!
Perfect, I owe you one! Thanks a bunch.
Most helpful comment
@jordonbaade Ah yes, one more little gotcha when upgrading to 1.0 with vue-resource. So in @taylorotwell's example in the Laravel docs, we have the following.
That worked perfectly in < 1.0, but now, you have to set the header like this.
Of course that
Laravel.csrfTokenis just an external object you create if you didn't already know that. I believe the vue-resource documentation doesn't even have this, it was only mentioned in this issue vuejs/vue-resource#412 just a couple days ago, anyway, hope that helps you out! If not, let me know!