javascript - React js and flux user store security -
i'm concerned how use different roles in react app. let's user tries login , send username, password server. if user logged in he/she have different roles in application, admin, user, etc.
{ "_id" : 8937493874398, "role" : "user" } is safe save in flux store? can role changed user in javascript console or that?
what proper way of handling this? want hide parts of application users has role : user , allow things role : admin
no it’s not "safe". send/store on client side can accessed , modified.
you have login functionality separated react app. after user logs in using standard request/response setup, can return react components based on user’s authentication level on server.
Comments
Post a Comment