fnakstad / angular-client-side-auth

One way to implement authentication/authorization in Angular applications
http://angular-client-side-auth.herokuapp.com/
MIT License
1.63k stars 346 forks source link

How about using JWT instead of cookies #90

Open ankitladhania opened 9 years ago

ankitladhania commented 9 years ago

I was really impressed by the way auth has been implemented. But i Thought i would be much nicer to use JSON Web Token(JWT). what have others to say about it ? like is it Good ? Bad? Please let me know as i'm implementing JWT for my production app.

tzarger commented 9 years ago

Great idea. I was just looking into using that myself.

With that: +1

jshemas commented 9 years ago

You should check out - https://github.com/sahat/satellizer

Its a great example of Token-based AngularJS Authentication.

fnakstad commented 9 years ago

That is an awesome example, and may very well be the way to go forward. I don't see the point in having two repo's solving the same problem in the same way, so maybe we can just keep this repo as it is for people looking for how to do auth in Anuglar with good old forms auth + cookies. What do you guys think?

flt123 commented 9 years ago

I believe your repo and satellizer are different. You go further with role based authentication on client and server side. I dont believe satellizer does that. I will say if you have the time, do some upgrade.

iotaweb commented 9 years ago

I agree with @flt123. I think there are many approaches and that this repo has a lot of merit for an approach based around cookies. If you wish to explore JWT, then satellizer looks promising, but auth0-angular is also pretty cool and worth considering.