Skip to content

Instantly share code, notes, and snippets.

@prozacchiwawa
prozacchiwawa / Example.elm
Created April 13, 2017 14:00 — forked from kspeakman/Example.elm
JWT expiration notification
-- Try to setup auto logout. But JWT parsing can fail in several ways.
--
-- Failure strategy:
-- 1. Console log failure.
-- 2. The fallback (not shown below) is to instruct the user to
-- manually log out and back in when we receive 401 Unauthorized.
--
-- TODO send failure to logging infrastructure.
notifyOnExpired : String -> Cmd Msg