On Tuesday, March 21, 2017 at 10:57:43 PM UTC, Mark Hamburg wrote: > > We've done that as well in places. But I was mostly looking for an example > of how to access extra data during an update. > > On Tue, Mar 21, 2017 at 3:20 PM, 'Rupert Smith' via Elm Discuss < > [email protected] <javascript:>> wrote: > >> Why not use a secure cookie? Then the browser adds it to the request for >> you. It is also more secure and has the advantage that if the user >> CTRL+clicks a link in your application opening up the same application in >> >1 tab, that the cookies flow across automatically. >> > The reason I pointed this out is that the auth module is one that is likely to be needed from a lot of places, so is likely to be at the heart of the dependency graph of an application. For that reason, I decided to treat it differently.
At first I set up ports so that any module importing Auth could directly pass it login/logout/refresh/unauthed requests. Then I changed it to use messaging implemented as an effects manager: https://github.com/rupertlssmith/elmq. I only did this for my Auth module, although it could be done for any inter-module communication. Really helped to simplify the dependency matrix. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
