Go
70.7%
HTML
22.1%
Nix
4.6%
CSS
1.7%
JavaScript
0.3%
Shell
0.2%
Other
0.4%
code
Clone this repository
https://tangled.org/keays.io/core
git@naught.keays.io:keays.io/core
For self-hosted knots, clone URLs may differ based on your setup.
After successful login, we start a goroutine to handle refreshing the
session token in the background, with session expiry defined in
auth.ExpiryDuration.
To kill the goroutine cleanly at Logout, s.sessionCancelFuncs maintains
a map of did->cancelFunc which we look up and call at logout.
Accounting for this map getting cleared at program end, we restore a
token refresher at the *first* authenticated request using RestoreSessionIfNeeded
in the AuthMiddleware.
we want to enable proper rollback mechanism on knots to eventually