angular - SPA, Web API Bearer Token security issues -


bearer: means person or thing carries or holds something.

it means login once, say, angular app, , can used anywhere postman or fiddle or other website using same token.

in angular 4, can store token either in cookie/localstorage/sessionstorage can accessed , used.

so how protect our token , web api use token created.

if token in cookie, try putting httponly on cookie. try setting samesite=strict or similar property on cookie. way available website.

note: samesite supported in latest webkit or blink based browsers.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -