ay4t/ionauth-views
Composer 安装命令:
composer require ay4t/ionauth-views
包简介
Custom Views with IonAuth Libraries for Codeigniter 4
README 文档
README
Custom Views with IonAuth Libraries for Codeigniter 4 This package can make instantly create view of authentication system. like login page, signup, forgot password and more with just few steps
#REQURMENT:
- ion_auth must be username as Identifier login. If you want to change it as you wish then make the changes yourself
- use Codeigniter 4 installation from composer
- require ion_auth 4 from composer
#STEP INSTALLATION:
- Install Codeigniter 4 via Composer
composer create-project codeigniter4/appstarter codeigniter4
- install ion_auth libraries:
composer config minimum-stability dev
composer config repositories.ionAuth vcs git@github.com:benedmunds/CodeIgniter-Ion-Auth.git
composer require benedmunds/CodeIgniter-Ion-Auth:4.x-dev
- install ay4t\ionauth-views
This plugins make automatically use Username as Identifier, But You must try or recheck your configuration to change default ionAuth Identifier form "email" to "username" use this command if you want releale version
composer require ay4t/ionauth-views:dev-main
or you can use this command for install from dev-main github repository
composer config repositories.IonauthView vcs git@github.com:ay4t/ionauth-views.git
composer require ay4t/ionauth-views
- then migrate database and seed database data
php spark migrate -n IonauthView
php spark db:seed IonauthView\Database\Seeds\IonAuthSeeder
5. (OPTIONAL) You can add this code to Config/Routes.php
/* * -------------------------------------------------------------------- * Route ay4t Auth Definitions * -------------------------------------------------------------------- */ $routes->group('auth', ['namespace' => 'IonauthView\Controllers'], function ($routes) { $routes->get('login', 'Auth::signin'); $routes->get('signup', 'Auth::signup'); $routes->get('forgot_password', 'Auth::forgotPassword'); $routes->get('reset_password/(:hash)', 'Auth::resetPassword/$1'); $routes->get('logout', 'Auth::signout'); /** ROUTES FOR APIS CALL BY AJAX FORM */ $routes->post('login', 'AuthHandler::doSignIn'); $routes->post('signup', 'SignupHandler::create'); $routes->post('forgot_password', 'ForgotPassHandler::createForgotPassword'); $routes->post('reset_password', 'ForgotPassHandler::createResetPassword'); });
#BOOMS now let's open http://<domain>/auth/login
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-01