Coder Social home page Coder Social logo

elijahbee / codeigniter-ion-auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benedmunds/codeigniter-ion-auth

0.0 2.0 0.0 2.07 MB

Simple and Lightweight Auth System for CodeIgniter

Home Page: http://benedmunds.com/ion_auth/

License: MIT License

PHP 92.85% HTML 6.13% JavaScript 0.07% CSS 0.95%

codeigniter-ion-auth's Introduction

Ion Auth 2

The future of authentication

by Ben Edmunds

Redux Auth 2 had a lot of potential. It's lightweight, simple, and clean, but had a ton of bugs and was missing some key features. So we refactored the code and added new features.

This version drops any backwards compatibility and makes things even more awesome than you could expect.

Support

If you use this to further your career, or put money in your pocket, and would like to support the project please consider a moral license.

Documentation

Documentation is located at http://benedmunds.com/ion_auth/

Installation

There are 2 ways to install this package.

  1. Move files from this package to the corresponding folder structure:
CI                          # → Root Directory
└── application/
    ├── config/
    │   └── ion_auth.php
    ├── controllers/
    │   └── Auth.php
    ├── libraries
    │   ├── Bcrypt.php
    │   └── Ion_auth.php
    ├── models
    │   └── Ion_auth_model.php
    └── views/
        └── auth/           # → Various view files

  1. Move files from this package to the corresponding third_party structure:
CI                          # → Root Directory
└── application/
    ├── controllers/
    │   └── Auth.php
    ├── third_party/
    │   └── ion_auth/
    │       ├── config/
    │       │   └── ion_auth.php
    │       ├── libraries
    │       │    ├── Bcrypt.php
    │       │    └── Ion_auth.php
    │       └── models
    │            └── Ion_auth_model.php
    └── views/
        └── auth/           # → Various view files

Then in your controller, example Auth.php add the package path and load the library like normal

$this->load->add_package_path(APPPATH.'third_party/ion_auth/');
$this->load->library('ion_auth’);

Or autoload by adding the following to application/config/autoload.php

$autoload['packages'] = array(APPPATH.'third_party/ion_auth');

CodeIgniter Version 2 Compatibility

CodeIgniter v2 requires the class file names to be lowercase. In order to support this follow the standard installation procedures and then either rename the following files or create symlinks

models/Ion_auth_model.php         =>   models/ion_auth_model.php
controllers/Auth.php              =>   controllers/auth.php

Relational DB Setup

Then just run the appropriate SQL file (if you're using migrations you can get the migrations from JD here: https://github.com/iamfiscus/codeigniter-ion-auth-migration).

Usage

In the package you will find example usage code in the controllers and views folders. The example code isn't the most beautiful code you'll ever see but it'll show you how to use the library and it's nice and generic so it doesn't require a MY_controller or anything else.

Default Login

Username: [email protected] Password: password

Important

It is highly recommended that you use encrypted database sessions for security!

Optimization

It is recommended that you add your identity column as a unique index.

Options

Time Based One-Time Password (TOTP) - There is a Time Based One-Time Password (TOTP) implementation compatible with Google Authenticator available. Feature branch maintained by biscofil and is available at https://github.com/benedmunds/CodeIgniter-Ion-Auth/tree/otp

For Help

Feel free to send me an email if you have any problems.

Thanks, -Ben Edmunds [email protected] @benedmunds

codeigniter-ion-auth's People

Contributors

adityamenon-exp avatar aphofstede avatar aplusphilic avatar appleboy avatar avenirer avatar axelay avatar bbosternak avatar benedmunds avatar cweric avatar dakutree avatar daparky avatar dentxinho avatar feldsam avatar ggallon avatar indigo744 avatar jrmadsen67 avatar kohtason avatar marcelod avatar markkasaboski avatar michaelbrooks avatar militis avatar patroklo avatar sepehr avatar snowboarder avatar sparky672 avatar suhindra avatar tagawa avatar thomasruns avatar tjoosten avatar toton333 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.