Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devsavage/slim-3-authentication
A Slim 3 authentication system.
https://github.com/devsavage/slim-3-authentication
authentication slim-3 slim-framework slim3 slimframework
Last synced: 3 months ago
JSON representation
A Slim 3 authentication system.
- Host: GitHub
- URL: https://github.com/devsavage/slim-3-authentication
- Owner: devsavage
- License: mit
- Created: 2016-04-05T05:58:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-18T07:51:52.000Z (over 5 years ago)
- Last Synced: 2024-04-04T23:42:44.274Z (10 months ago)
- Topics: authentication, slim-3, slim-framework, slim3, slimframework
- Language: PHP
- Homepage:
- Size: 303 KB
- Stars: 43
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slim 3 Authentication
A very easy to use Slim 3 authentication system.[![Latest Unstable Version](https://poser.pugx.org/devsavage/slim-3-authentication/v/unstable?format=flat-square)](https://packagist.org/packages/devsavage/slim-3-authentication)
[![License](https://poser.pugx.org/devsavage/slim-3-authentication/license?format=flat-square)](https://packagist.org/packages/devsavage/slim-3-authentication)If you stumble upon any vulnerabilities within this package, more importantly with the role/permission system, please send your findings to: **[email protected]**.
## Getting Started
### Prerequisites
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](https://httpsiseasy.com/) for help setting this up!
* [Composer](https://getcomposer.org/)
* [Yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/)### Installing
#### Clone the project:
```
git clone https://github.com/devsavage/slim-3-authentication.git your-project-name
```#### Install the composer dependencies:
```bash
$ cd your-project-name && composer install
```#### Inside your project folder, install the node dependencies using yarn or npm:
```bash
$ yarn install
```#### Rename *_.env-example_* to *_.env_*
#### Update *_.env_* to your project's configuration
```bash
APP_ENV=development
```
You will need to update the **APP_ENV** variable to "production" when serving your application outside of a local environment!#### Build assets (prodution or development)
```bash
$ yarn prod
``````bash
$ 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
```bash
php phinx create MigrationName
```
Create seed file
```bash
php phinx seed:create SeedName
```
Run migrations
```bash
php phinx migrate
```
Run seeds
```bash
php phinx seed:run
```
Use `php phinx` on terminal to see all available command list.#### You will also need Google reCAPTCHA API keys. Get them [here](https://www.google.com/recaptcha).
*If you would like to completely disable reCAPTCHA, see this [page](https://github.com/devsavage/slim-3-authentication/wiki/Completely-remove-reCAPTCHA)*
### Check out the [wiki](https://github.com/devsavage/slim-3-authentication/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](LICENSE) file for details