PHPackages                             hieu-le/taki - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. hieu-le/taki

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

hieu-le/taki
============

Adding additional functions to Laravel authentication and supports social login management

1.0.1(10y ago)061[2 issues](https://github.com/letrunghieu/taki/issues)MITPHPPHP &gt;=5.4.0

Since Sep 3Pushed 10y agoCompare

[ Source](https://github.com/letrunghieu/taki)[ Packagist](https://packagist.org/packages/hieu-le/taki)[ Docs](https://www.hieule.info/)[ RSS](/packages/hieu-le-taki/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Taki
====

[](#taki)

A collection of useful traits to make Laravel 5.1 authentication system more flexible.

[![Build Status](https://camo.githubusercontent.com/80dcdb67c453f245eaf7b9f242b589f8c6168d48f2f8fee8e68ebc0c8e32c4f5/68747470733a2f2f7472617669732d63692e6f72672f6c657472756e67686965752f74616b692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/letrunghieu/taki)[![Code Climate](https://camo.githubusercontent.com/0f75c57ba0bbcfd728d82c1649b113e1d570415403af8bb7e933ca5a33b0ab5f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c657472756e67686965752f74616b692f6261646765732f6770612e737667)](https://codeclimate.com/github/letrunghieu/taki)[![Test Coverage](https://camo.githubusercontent.com/a93ebf9c040bd0b6e92f7da77e0af41c811d02c6646f46601919cc06ba4f6e45/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6c657472756e67686965752f74616b692f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/letrunghieu/taki/coverage)[![Latest Stable Version](https://camo.githubusercontent.com/cd40353f123bb4ab58fab1983d4333ab02c5b9bf95516e664fc7848d8f50e640/68747470733a2f2f706f7365722e707567782e6f72672f686965752d6c652f74616b692f762f737461626c65)](https://packagist.org/packages/hieu-le/taki) [![Total Downloads](https://camo.githubusercontent.com/b24e4ed859f816034745614e70a09f0de1a77af612233d7311dbbd98013c401b/68747470733a2f2f706f7365722e707567782e6f72672f686965752d6c652f74616b692f646f776e6c6f616473)](https://packagist.org/packages/hieu-le/taki) [![License](https://camo.githubusercontent.com/5b73945aadfe4f701fb5b58745d913be59096fd1807c0f67e6cb069e0bf01f23/68747470733a2f2f706f7365722e707567782e6f72672f686965752d6c652f74616b692f6c6963656e7365)](https://packagist.org/packages/hieu-le/taki)

Why?
----

[](#why)

Laravel 5.1 already has a cute authentication system. However, user can make it more beautiful by some traits in this package:

- Allow user to log in by username, email or both
- Allow user to set their password before creating a new account with Social service providers (facebook, google, ...)
- Allow user to set their username before creating a new account with Social service providers (facebook, google, ...)
- More configurable options for redirecting paths
- Full test suite

Installation
------------

[](#installation)

First, you have to require this package via composer

```
composer require "hieu-le/taki"

```

Now, register the service provider by adding this line into your `providers` array inside the `config/app.php` file:

```
HieuLe\Taki\TakiServiceProvider::class,

```

Register an alias by adding this line into your `aliases` array inside the `config/app.php` file:

```
'Taki' => HieuLe\Taki\TakiFacade::class,

```

If you use traditional RDBMS, this package is shipped with a built in migration file for the `users` table, please remove the Laravel's one at `database/migrations/xxxx_xx_xx_xxxxxx_create_user_table.php` and run this command

```
php artisan vendor:publish --provider="HieuLe\Taki\TakiServiceProvider"

```

Edit the new migration file and run `php artisan migrate` when you're ready.

Usage
-----

[](#usage)

This package helps you by implementing some methods in your authentication controller. This is the list of them, you have to create the others by yourself (most of them is just **GET** method which simply returns a view).

methodresponsibility`postLogin`Handle the login request`postRegister`Handle the registration request`getActivate`Handle the account activation request`getOauth`Handle the request when user click the li`getOauthCallback`Handle the returned data from third-party social network`postOauthComplete`Handle the registration request after some information is retrieved from OAuth 2 authentication`getLogout`Handle the logout requestFor password recovery and password reset, the built in trait of Laravel is good enough to me. Therefore, I do not create any modification to it at least in the first release of this package.

Now, use the `HieuLe\Taki\Traits\TakiTrait` in your authentication controller, register routes and implement views.

Configurations
--------------

[](#configurations)

When running the `vendor:publish` command above, a new file named `taki.php` is created in your `config` folder. If you want to modify any option of this package, edit this file.

optiondescriptionvaluesdefault`taki.username.required`Is the `username` field required when registering new account?boolean`false``taki.username.validator`The validation rule of the `username` field`string`required`taki.login_by`Which field is used when authenticating user.`email`, `username`, `both``email``taki.confirm_after_created`Do users need to confirm their email after creating account? if the emails do not need to verified, users will be logged in right after being registered.boolean`false``taki.field.username`The name of username fieldstring`username``taki.field.email`The name of email fieldstring`email``taki.field.both`The name of the input field when accepting both username and email in log in processstring`login``taki.social.password_required`Do users need to provide password before creating account with social network credentials?boolean`false``taki.social.username_required`Do users need to provide username before creating account with social network credentials?boolean`false``taki.emails.activate`The view name of account activation email. If its value is an array, the first element is the HTML view name, the second element is the text view name.arraystring`taki.emails.activate_subject`The subject of the account activation emailstring`Your account need activating``taki.validator.create`The validator rules when creating new userarrayview in fileController properties and methods
---------------------------------

[](#controller-properties-and-methods)

### Properties

[](#properties)

Taki looks at some properties in your controller and allows you to customize its behavior via these properties:

propertyresponsibilitydefault`loginPath`The path user is redirected to when login failed`/auth/login``redirectAfterLogout`The path user is redirected to after being logged out`/``postRegisterRedirect`The path user is redirected to after a success registration`/home``oauthCompletedPath`The path user is redirected to after authenticated in social service, this path will display another form to allow user to supply their username and/or password`/oauth/complete``activatedView`The view name of user activation page`auth.activate`### Methods

[](#methods)

Implementing this methods allows you to gain more control over your authentication flow:

methodexecuted at`authenticated($request, $user)`After user is logged in and before the redirect response is returned`userRegistered($request, $user)`After user's account is created`userActivated`After user's account is activatedLicense
-------

[](#license)

This package is release under the [MIT license](LICENSE), feel free to use it in your work.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

2

Last Release

3907d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98ce9136dff54b74ddb9afe69ae5c9c0cf573b00603e80ad9ee332f24f0b1342?d=identicon)[letrunghieu](/maintainers/letrunghieu)

---

Top Contributors

[![letrunghieu](https://avatars.githubusercontent.com/u/1145335?v=4)](https://github.com/letrunghieu "letrunghieu (33 commits)")

---

Tags

laravelAuthenticationsocial

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hieu-le-taki/health.svg)

```
[![Health](https://phpackages.com/badges/hieu-le-taki/health.svg)](https://phpackages.com/packages/hieu-le-taki)
```

###  Alternatives

[pragmarx/google2fa-laravel

A One Time Password Authentication package, compatible with Google Authenticator.

1.0k15.5M63](/packages/pragmarx-google2fa-laravel)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6712.1k2](/packages/hasinhayder-tyro)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
