An authentication system using the Slim Framework.
A very easy to use Slim 3 authentication system.
If you stumble upon any vulnerabilities within this package, more importantly with the role/permission system, please send your findings to: email@example.com.
You will need the following to get started:
- 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!
git clone https://github.com/devsavage/slim-3-authentication.git your-project-name
$ cd your-project-name && composer install
$ yarn install
You will need to update the APP_ENV variable to "production" when serving your application outside of a local environment!
$ yarn prod
$ yarn dev
- Import auth.sql file to your database.
- Open your site, register a new user and click on activation link sent to your email
- 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.
- Login on site to see "Admin Dashboard" on header menu
Create migration file
php phinx create MigrationName
Create seed file
php phinx seed:create SeedName
php phinx migrate
php phinx seed:run
php phinx on terminal to see all available command list.
You will also need Google reCAPTCHA API keys. Get them here.
If you would like to completely disable reCAPTCHA, see this page
Check out the wiki for more information and details on how to add new controllers, routes and more.
This project is licensed under the MIT License - see the LICENSE file for details