Role based AngularJS JWT authentication -


i have angularjs web application. serve data backend spa i'm using asp.net web api.

at backend implemented json web token authentication in great blog post: http://bitoftech.net/2015/03/31/asp-net-web-api-claims-authorization-with-asp-net-identity-2-1/

now i'm looking implementation @ client-side. found lot of angular packages authentication. couldn't found using json web token , role based authentication.

do know solution with:

  • ui-router
  • roles
  • json web token (jwt)
  • refresh token
  • external login (facebook, google, ...)

the backend solution working , find suitable angularjs frontend solution.

wanting of these combined little bit of wishful thinking. there's pretty github repo jwt + refresh token logic https://github.com/auth0/angular-jwt library uses interceptors send authentication header info each request.

honestly homie, you'd better off creating own angular services handle these. suggest creating service kept track of user roles , using localstorage note if user has been authenticated facebook, twitter, etc... https://github.com/fnakstad/angular-client-side-auth


Comments