Open micobarac opened 5 years ago
Btw, I don't understand how your Laravel Angular
component works on integration between Laravel and Angular. The docs show the way to install it, but there isn't any info on the mechanism it provides in details. Can you please explain this? Thanks.
Hey @micobarac Thanks for opening an issue! You're right, there's only the "Laravel side of things" but not the Angular one. Let's see how we solve this issue here and if it turns out helpful, maybe I (or we) can work on an angular-laravel package that accompanies this PHP package.
I think you need to move the login into the auth
middleware (not auth:api
yet because it's not authenticated yet)
That's because you don't need CSRF tokens when workign with APIs
Keep me posted!
That's because you don't need CSRF tokens when working with APIs
Not unless the API in question is actually part of the back-end of a Single Page Application that uses sessions to authenticate each request while logged in.
These are my API routes:
I installed
Laravel Angular
andTymon JWT
according to your docs, but when I try to call login method through the Postman onhttp://localhost:8000/api/login
, I getSession store not set on request error
. The only thing I added to these components isBarryvdh CORS
component.It looks like Laravel is expecting some kind of CSRF token, but I cannot give it one. I'm not sure about this, anyway.