Socket
Socket
Sign inDemoInstall

authonice-mithril

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    authonice-mithril

authonice frontend for mithril


Version published
Maintainers
1
Install size
95.7 kB
Created

Readme

Source

authonice logo

authonice (mithril)

IN PROGRESS: not ready, yet

This is the authonice frontend for mithril.

npm Build Status Code Climate

authonice is a platform/language/framework agnostic ecosystem for web-app authentication, with lots of inspiration from satellizer.

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.

If we don't have a module for the frontend-framework/backend-language/auth-service you want to support, ask us or contribute!

installation

You can install with bower, npm, download or just add script tags to your HTML.

webpack/browserify/etc

var authonice = require('authonice-mithril');

requirejs

define(['mithril','authonice-mithril'], function(m, authonice){
  
});

plain browser globals

<script src="https://cdnjs.cloudflare.com/ajax/libs/mithril/0.1.30/mithril.min.js"></script>
<script src="https://rawgit.com/authonice/front-mithril/master/dist/authonice-mithril.min.js"></script>

usage

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.request that ensures authentication & defaults to GET

For an in-depth example see demo-node-mithril

Keywords

FAQs

Last updated on 15 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc