Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/divpusher/codeigniter4-auth
A simple authentication library for CodeIgniter 4.
https://github.com/divpusher/codeigniter4-auth
auth authentication codeigniter4 registration simple
Last synced: 3 months ago
JSON representation
A simple authentication library for CodeIgniter 4.
- Host: GitHub
- URL: https://github.com/divpusher/codeigniter4-auth
- Owner: divpusher
- Created: 2020-01-24T17:16:07.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-09T08:28:07.000Z (over 3 years ago)
- Last Synced: 2024-10-01T00:41:08.962Z (3 months ago)
- Topics: auth, authentication, codeigniter4, registration, simple
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 102
- Watchers: 13
- Forks: 25
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
- awesome - divpusher/codeigniter4-auth - A simple authentication library for CodeIgniter 4. (PHP)
README
A simple authentication library for [CodeIgniter 4](https://codeigniter.com).
**Features:**
- registration
- email activation
- login/logout
- forgotten password
- account settings (with proper email and password change options)
- CSRF protection
- localization## Install
Download the package and place the `Auth` folder in `app/ThirdParty/`.
Open `app/Config/Autoload.php` and add to autoload like this:
```
$psr4 = [
'Config' => APPPATH . 'Config',
APP_NAMESPACE => APPPATH,
'App' => APPPATH,
'Auth' => APPPATH . 'ThirdParty/Auth',
];
```Set up the email in `app/Config/Email`. **Fill the `$fromEmail` and `$fromName` as well!** I suggest you to use [mailtrap.io](https://mailtrap.io) for local development.
Enable CSRF in `app/Config/Filters`.
Make sure that your database is set in `.env` file or in `app/Config/Database.php`. Install the users table by running the following command in your project root:
`php spark migrate`
Visit `/register` on your local server to begin.
## To-do list
- use the new `is_not_unique` validation rule where possible