2017 © Pedro Peláez
 

project slim-3-authentication

An authentication system using the Slim Framework.

image

devsavage/slim-3-authentication

An authentication system using the Slim Framework.

  • Tuesday, April 10, 2018
  • by savage
  • Repository
  • 9 Watchers
  • 23 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Slim 3 Authentication

A very easy to use Slim 3 authentication system., (*1)

Latest Unstable Version License, (*2)

If you stumble upon any vulnerabilities within this package, more importantly with the role/permission system, please send your findings to: savage@savagedev.io., (*3)

Getting Started

Prerequisites

You will need the following to get started:, (*4)

  • A web server with URL rewriting
    • PHP 5.5 or newer
    • A SSL certificate will be required in production environments! Check out HTTPS Is Easy for help setting this up!
  • Composer
  • Yarn or npm

Installing

Clone the project:

git clone https://github.com/devsavage/slim-3-authentication.git your-project-name

Install the composer dependencies:

$ cd your-project-name && composer install

Inside your project folder, install the node dependencies using yarn or npm:

$ yarn install

Rename .env-example to .env

Update .env to your project's configuration

APP_ENV=development

You will need to update the APP_ENV variable to "production" when serving your application outside of a local environment!, (*5)

Build assets (prodution or development)

$ yarn prod
$ yarn dev

Database and Admin

  1. Import auth.sql file to your database.
  2. Open your site, register a new user and click on activation link sent to your email
  3. Go to phpMyAdmin, select user_roles table and insert a new record. Select your user on user_id field, select "superadmin" on role_id field and confirm.
  4. Login on site to see "Admin Dashboard" on header menu

Migrations and Seeds

Create migration file, (*6)

php phinx create MigrationName

Create seed file, (*7)

php phinx seed:create SeedName

Run migrations, (*8)

php phinx migrate

Run seeds, (*9)

php phinx seed:run

Use php phinx on terminal to see all available command list., (*10)

You will also need Google reCAPTCHA API keys. Get them here.

If you would like to completely disable reCAPTCHA, see this page, (*11)

Check out the wiki for more information and details on how to add new controllers, routes and more.

License

This project is licensed under the MIT License - see the LICENSE file for details, (*12)

The Versions