Hey there!

What is a good way to handle http request authentication with the elm 
architecture?

I need to get data from an API that requires a valid token for every 
request. Tokens expire after X minutes and should be refreshed, if a 
request fails with an authentication error. When the first request fails 
all subsequent requests initiated by the user should be stored and 
performed once a new valid token has been retrieved. (and the first failing 
one retried)

My goal is to not repeat this logic in every module and have it somewhere 
“globally available” for the app. Anyone writing features should in the 
best case scenario just send a command and the token refreshing logic is 
behind some abstraction/in the root App component. 


Cheers,

Max

-- 
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.

Reply via email to