mochi

Authentication shard inspired by Devise supporting: Authenticable, Confirmable, Invitable & more
0.1.0 released
awcrotwell/mochi
25 2 1
Andi

Mochi

Mochi is a shard inspired by devise for ruby. Mochi handles everything authentication. Currently amber is the only supported framework with both granite and jennifer orms being supported. I am open to other frameworks being supported, such as lucky, but there is a lot to do before that. If you want this to work with lucky asap, you'll have to open a pull request right now.

The Mochi CLI makes installation easy. Please give a thanks to the amber core team for their CLI. I have pulled it out of amber to use as a base.

Note: Only the class 'User' is supported right now. This may change in future releases.

Currently, Mochi has 4 modules:

  1. Authenticable
  • Basic authentication. Sign up, sign in, sign out.
  • Mandatory columns:
    • email & password_digest

Note: Mochi also puts 'password' and 'new_password' in as attributes, however we don't want these saved in plain text so do NOT add them as columns.

  1. Confirmable
  • Users are required to confirm their email prior to activation. Mochi generates a UUID for each user and sends an email. This UUID is for user activation and verification
  • Mandatory columns:
    • confirmation_token
    • confirmed
    • confirmed_at
    • confirmation_sent_at
    • unconfirmed_email.
  1. Omniauthable
  • Users can sign up with google, facebook, github, twitter or vk. (Google & VK WIP)
  • Mandatory columns:
    • uid
  1. Trackable
  • Tracks sign_in_count, current_sign_in_ip, last_sign_in_ip, current_sign_in_at & last_sign_in_at
  • Mandatory columns:
    • sign_in_count
    • current_sign_in_ip
    • last_sign_in_ip
    • current_sign_in_at
    • last_sign_in_at

Documentation

Gitbook

Gitbook

Authentication

Installation Guide

Confirmation

Installation Guide

Trackable

Installation Guide

Omniauthable

Installation Guide

mochi:
  github: awcrotwell/mochi
  version: ~> 0.1.0
License MIT
Crystal 0.33.0

Authors

Dependencies 5

Development Dependencies 6

  • amber 0.32.0
    {'branch' => 'master', 'github' => 'amberframework/amber', 'version' => '0.32.0'}
  • granite ~> 0.19.0
    {'github' => 'amberframework/granite', 'version' => '~> 0.19.0'}
  • jasper_helpers ~> 0.2.5
    {'github' => 'amberframework/jasper-helpers', 'version' => '~> 0.2.5'}
  • jennifer master
    {'branch' => 'master', 'github' => 'imdrasil/jennifer.cr'}
  • jennifer_sqlite3_adapter master
    {'branch' => 'master', 'github' => 'imdrasil/jennifer_sqlite3_adapter'}
  • sam 0.3.2
    {'github' => 'imdrasil/sam.cr', 'version' => '0.3.2'}

Dependents 0

Last synced .
search fire star recently