IN PROGRESS: not ready, yet
This is the authonice frontend for mithril.
It's designed to work with lots of backend languages, auth services, & frontend frameworks. It's goal is to make you super-happy because your sites are safe, easy to setup & maintain, and stylishly locked-down in your language/frameworks of choice.
You can install with bower, npm, download or just add script tags to your HTML.
var authonice = ;
plain browser globals
The API is très simple:
loggedIn()- does the user have a token?
login(email, password)- trade credentials for a token
logout()- forget token
register(email, password)- save some login credentials
verify(token)- prove that the user got an email (or read the console or whatever)
user()- get the current server-side user
req()- a wrapper for
m.requestthat ensures authentication & defaults to
For an in-depth example see demo-node-mithril