I have custom Firebase auth processes (Auth0 => Firebase), so I run all my login logic using TypeScript with Svelte <https://github.com/sveltejs/svelte>, once I have a successful JWT token, either from sessionStorage or from a fresh login, I then boot off my Elm app, sending it some JWT, profile info via a Flag. I have its a SPA, with a routeing and pages, all componentized and working fine.
My only real problem now is comms to firebase, sure, ElmFire exists, but how do I just give it an active auth token etc... and without loading Firebase for JS and ElmFire for Elm. Just seems like way to many kbs. Is there a nice and efficient way to let Elm port out a "hey listen to this ref", with a "hey Elm, I have some new data for you for this ref". Ports to tell JS to listen, and subscriptions to tell Elm about new data. Without having a port for every listen, and a subscription for every data callback. Ideally, I'd like my update, to send off a Cmd that accepts a callback Msg, the update function to call and a ref. So that way I can store that in a List of some sort, and when I get a new data payload from JS, I can loop over my List find the item that matches the ref, execute the update, sending in the Msg with the string value, so decoding happens on the pages' update. My code is currently closed source (Github), if anyone is genuinely keen to help me out, with a top-notch solution, ill add you to the repo, and give you some $$ for your time. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.