If the returned value of the fetched endpoint is blank that gets
converted to undefined, which confuses the request sharing between the
client and server causing the session to be requested on both sides.
Transform value to null if it's blank so that the session fetch is
de-duplicated.
If a user logs out from a device the expectation should be that device
no longer having any association with the user's account. Any existing
push notifications should thefore be removed on server. For this reason
tie push notifications to a session, and remove them when the session is
deleted.
Provide a basic account system with login and server side session store
identified by a cookie. Upon successful login a signed session cookie
is set by the server with the session stored on the server identifying
which account it is logged in as. The client uses a shared useFetch on
the session endpoint to identify if it's logged in and which account it
is logged in as, and refreshes this when loggin in or out.
Provide a convenient wrapper for setting SHA-256 HMAC signed cookies and
retreiving them with the signature validated. The secret key is
configured in the NUXT_COOKIE_SECRET_KEY environment variable.
If a span ended on midnight the next day header would be started on the
break and the sameDay check would match the day of the next span causing
the day header to be inserted into the break column. Fix by checking
that the last day header has a non-zero span in the same day check.
Add .editorconfig, .vscode and .gitattributes configs to make editors
and tools aware that the files use unix line indeings and are indentent
with tabs.