An implementation of the servant-auth example using Elm and the XSRF-protect package.
The haskell part of the implementation tries to stay as close as possible to the literal haskell Readme example. The JWT option has been removed as its not relevant for the XSRF cookie example.
To run the example, first build the Elm app inside the frontend folder
elm make src/App.elm --output app.js
You can then run the backend server using stack
stack run
and open index.html
at localhost:4000
I tried to stay as close as possible to the servant-auth example. Therefore, there is no logout option avaliable. In order to test login / logout behaviour, you can use your browser's development tools to manually clear the session cookies.