SPAs Are Dead?
21–30 of 118 posts
Re: SPAs Are Dead?
#22Earlier quoted context omitted.
I don’t know whether you are referring to only local and session storage being feasible or not, but on can access cookies from JS as well.
Normal cookies are JS-accessible, but HTTP-only cookies should not be: "A cookie with the HttpOnly attribute is inaccessible to the JavaScript Document.cookie API; it is sent only to the server." https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#re...
Re: SPAs Are Dead?
#23Earlier quoted context omitted.
This is how I prefer to do it. No CORS pre-flight requests and messing with CORS settings
Seconding (thirding?) this. I'm curious, are there any SPAs that aren't done this way?
Well... you could. Harder now.
From the article:
> So are SPAs dead? Well – SPAs as in the UI/UX concept certainly not. SPAs as in “browser-based standalone applications that do cross-site authentication and API calls in the context of a modern identity and SSO architectures” – yes.
Re: SPAs Are Dead?
#24Re: SPAs Are Dead?
#25Cookies suck. The interface is beyond terrible, they were never scoped properly, and they don't have to be used. Browser storage (sessionStorage, localStorage) is perfectly valid for storing an authentication token.
No, it is not. And I hope I never end up using any application developed this way. Tokens stored in those storages you mention can be read by any javascript code, even third party. That doesn't happen with http-only cookies. Be careful with what you recommend publicly, as others might end up assuming this is fine, when it is clearly not.
Re: SPAs Are Dead?
#26Has the latter ever been a definition of "SPA"? One would have thought the acronym "single page application" to have been fairly precise...
Re: SPAs Are Dead?
#27Earlier quoted context omitted.
This is how I prefer to do it. No CORS pre-flight requests and messing with CORS settings
Seconding (thirding?) this. I'm curious, are there any SPAs that aren't done this way?
Edit: I meant Cloudfront. I do that a lot
Re: SPAs Are Dead?
#28Cookies suck. The interface is beyond terrible, they were never scoped properly, and they don't have to be used. Browser storage (sessionStorage, localStorage) is perfectly valid for storing an authentication token.
Leaking your auth tokens through XSS sucks more.
Re: SPAs Are Dead?
#29Earlier quoted context omitted.
No, it is not. And I hope I never end up using any application developed this way. Tokens stored in those storages you mention can be read by any javascript code, even third party. That doesn't happen with http-only cookies. Be careful with what you recommend publicly, as others might end up assuming this is fine, when it is clearly not.
If your third party libraries are so poisoned that you're leaking localstorage, you've got bigger problems than just localstorage... This argument against using localstorage makes no sense
Re: SPAs Are Dead?
#30Cookies suck. The interface is beyond terrible, they were never scoped properly, and they don't have to be used. Browser storage (sessionStorage, localStorage) is perfectly valid for storing an authentication token.
No, it is not. And I hope I never end up using any application developed this way. Tokens stored in those storages you mention can be read by any javascript code, even third party. That doesn't happen with http-only cookies. Be careful with what you recommend publicly, as others might end up assuming this is fine, when it is clearly not.