skip
skip

Reputation: 12643

User Registration and Authentication/Authorization with MEAN Stack

I need to register users with my AngularJS app. I would like hashing with salt to take place when storing the password into MongoDB. Then I would like the same user to authenticate and authorize for some of the actions he/she could take.

I come from Java/JavaEE background and have never done any registration/authentication/authorization work for a JavaScript app using MEAN stack.

Is there any reference/sample MEAN app I could refer to for understanding registration/authentication/authorization?

Should I be using Cookies or tokens for authentication?

Upvotes: 1

Views: 1807

Answers (1)

rnrneverdies
rnrneverdies

Reputation: 15627

Is there any reference/sample MEAN app I could refer to for understanding registration/authentication/authorization?

I preffer passport.js. Plugs to express, Supports both Tokens and Cookies, it is easy to work with Angular.js via ajax.

Should I be using Cookies or tokens for authentication?

Take your own decision, but read this and this and this

I come from Java/JavaEE background and

Not clear but if you are new to web development, may be you should read this excellent post

Upvotes: 3

Related Questions