Giter Club home page Giter Club logo

ci4-auth's Introduction

PHPAuth for CodeIgniter 4

This package is adopted from PHPAuth, but completedly rewrited for easy implementation with CodeIgniter 4.

Installation

  1. composer require arif-rh/ci4-auth
  2. make sure you have set you database config properly
  3. php spark migrate -n Arifrh\Auth
  4. php spark db:seed \\Arifrh\\Auth\\Database\\Seeds\\AuthSeeder

Features

  • Register
  • Activation email
  • Login
  • Request reset password
  • Encrypt password using bcrypt
  • Prevent brute force attack by limiting request

Acknowledgments

ci4-auth's People

Contributors

arif-rh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

herdiandkun

ci4-auth's Issues

Unable to connect to the database

Hello,

I've tried today the library ... and I have a small issue if you can help.

I've done the migrate and everything, but when I wanted to test the login:

$login = new Auth\Auth();
return $login->login("[email protected]", "pass");

It's saying Unable to connect to the database . I mention that the database it's connected to ci4 in both .env and /app/Config/Database.php files.

Any ideas ?

Regards,
Anwar

Need some help

Where i can find the docs on how to implement this library?
Also this library have permissions, or only user roles?

Seeder Fails if DBPrefix is set

Database Config DBPrefix is not included in query:
$sql = "
INSERT INTO " . $config->userTable . " (email, password, group_id, role_id, active) VALUES
('[email protected]', '" . $password . "', 1, 1, 1);
";
$this->db->query("INSERT INTO " . $config->userGroupTable . " (group, description) VALUES ('Super Admin', 'Super Admin'), ('Admin', 'Admin'), ('User', 'User');");

$this->db->query("INSERT INTO " . $config->userRoleTable . " (group_id, role, description) VALUES (1, 'Administrator', 'Administrator'), (2, 'Web Admin', 'Web Admin'), (3, 'User', 'User');");
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.