AngularJS + Laravel 5 Authentication

前端 未结 2 1480
南方客
南方客 2021-02-06 03:44

While building my SPA with angularJS, i came to the point where i want to implement user authentication in my angularJS website. However, i have no idea where to start and what

2条回答
  •  耶瑟儿~
    2021-02-06 04:06

    I like the same approach that @neoroger takes using JSON Web Tokens with jwt-auth. I used the Satellizer package for storing the token on the front end and to send it along with each request to the API afterwards.

    I put together a couple tutorials that show how to implement the two packages if you are interested:

    https://scotch.io/tutorials/token-based-authentication-for-angularjs-and-laravel-apps

    http://ryanchenkie.com/token-based-authentication-for-angularjs-and-laravel-apps/

提交回复
热议问题