bob

bob

Happy to help. Full disclaimer: what was shown off at ElixirConf was a first working prototype (so I’m obviously completely embarrassed about a number of make-it-work decisions in the code shown that I later refactored into a much more elegant and dynamic system :grimacing:). Feel free to email/message me if questions arise—I’d be happy to talk about things learned and improved along the journey.

0
Post #11
superchris

superchris

Hi, author of LiveState here. Fun fact, LiveState only exists because I was unsuccessful doing what you are trying to do :slight_smile: I ended up diving deep into the bowels of live_view both client and server. It’s been a couple years so I no longer have all the details in my memory banks, but I ended up having to make significant hacks to both. At the point where I ended up needing my own type of templates (heex was doing something I couldn’t get around as I recall) I gave up.

OTOH, I and several others have done projects to build web components for customers with LiveState, this is what’s it’s designed for. If you go this route and need any help (or not!) we’d love to hear about it. Good luck!

0
Post #12
sezaru

sezaru

Hey @bob would you mind sharing what changes you needed to do to make CSP work in our case?

I’m also trying to run a liveview page inside an iframe as you did for Payitoff, but I’m having problems to make it work well when injecting the iframe in another domain.

Also, another question, did you manage to make your solution work with Safari? Safari will block third party cookies inside an iframe, so to make it work you normally will need to totally remove the session cookie from liveview (you will need to remove the :fetch_session and :protect_from_forgery plugs for example) making it insecure.

0
Post #13
adw632

adw632

Yes it would certainly be primarily for regular site use cases as the initial render is important for SSO.

However I can also see use cases that would allow the component author to ship a tiny shim component and dynamically load the content and the full component code on the first render. This would be a nice way to handle seamless server based upgrades.

0
Post #14
— All posts loaded —