Basheer Kharoti
Basheer Kharoti

Reputation: 4302

Laravel 5.2 passport authentication with angular 2

I'm just new to laravel passport so it is kind of confusing to me. I have watched Taylor otwell tut on passport but still I am not able to figure out that Is it possible to authenticate an angular app with laravel passport?

What I want to do is build a Full SPA application with angular 2 as frontend and laravel 5.3 as back-end. I've used JWT for authentication with laravel on version 4.2 but just want to know if it is do able through laravel passport.

Your comments and answers will be appreciated.

Thanks

Upvotes: 2

Views: 2861

Answers (1)

Filip Koblański
Filip Koblański

Reputation: 10008

Yes it is possible but it's also more complicated then it was in Angular 1.

This entry could be helpful:

Angular2 - set headers for every request

because you need to pass CSRF token to the app to consume your application as it's written here:

https://laravel.com/docs/5.3/passport#consuming-your-api-with-javascript

Upvotes: 1

Related Questions