PHPackages                             gurinder/laravel-auth - 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. gurinder/laravel-auth

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

gurinder/laravel-auth
=====================

Laravel Authentication System - Including UI

1.0.4(7y ago)0203MITPHPPHP ^7.1.3

Since Jun 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gurindersingh/laravel-auth)[ Packagist](https://packagist.org/packages/gurinder/laravel-auth)[ Docs](https://github.com/gurindersingh/laravel-auth)[ RSS](/packages/gurinder-laravel-auth/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (15)Versions (6)Used By (0)

Laravel Login and Register system including Laravel Socialite and Email Confirmation
====================================================================================

[](#laravel-login-and-register-system-including-laravel-socialite-and-email-confirmation)

It has Google, Facebook, Github and Twitter out of box (login or registering by email and name).

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

[](#installation)

### Step 1

[](#step-1)

Include via Composer

```
composer require gurinder/laravel-auth
```

### Step 2 (Optional)

[](#step-2-optional)

Publish the views(If required to customize), config(Optional)

```
// Optional
php artisan vendor:publish --tag="gauth::views"

// Optional
php artisan vendor:publish --tag="gauth::config"
```

### Step 3

[](#step-3)

Add following to your User Model Schema

```
Schema::create('users', function (Blueprint $table) {
    ...
    $table->boolean('email_verified')->default(false);
    $table->string('email_verification_token')->nullable();
    ...
});
```

### Step 4

[](#step-4)

Get cliend ids and secret for your applications and put in .env file

```
FACEBOOK_APP_ID=
FACEBOOK_APP_SECRET=
SOCIALITE_FACEBOOK_CALLBACK="/socialite/facebook/callback"

TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=
SOCIALITE_TWITTER_CALLBACK="/socialite/twitter/callback"

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_DEVELOPER_KEY=
SOCIALITE_GOOGLE_CALLBACK="${APP_URL}/socialite/google/callback"

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
SOCIALITE_GITHUB_CALLBACK="/socialite/github/callback"
```

### Step 5

[](#step-5)

Add Social Providers to `config/service.php`

```
return [

    // ....

    'twitter' => [
        'client_id'     => env('TWITTER_CLIENT_ID'),
        'client_secret' => env('TWITTER_CLIENT_SECRET'),
        'redirect'      => env('SOCIALITE_TWITTER_CALLBACK'),
        'access_token'  => env('TWITTER_ACCESS_TOKEN'),
        'access_secret' => env('TWITTER_ACCESS_SECRET'),
    ],

    'github' => [
        'client_id'     => env('GITHUB_CLIENT_ID'),
        'client_secret' => env('GITHUB_CLIENT_SECRET'),
        'redirect'      => env('SOCIALITE_GITHUB_CALLBACK'),
    ],

    'facebook' => [
        'client_id'     => env('FACEBOOK_APP_ID'),
        'app_id'        => env('FACEBOOK_APP_ID'),
        'client_secret' => env('FACEBOOK_APP_SECRET'),
        'redirect'      => env('SOCIALITE_FACEBOOK_CALLBACK'),
    ],

    'google' => [
        'recaptcha_site_key'   => env('GOOGLE_RECAPTCHA_SITE_KEY'),
        'recaptcha_secret_key' => env('GOOGLE_RECAPTCHA_SECRET_KEY'),
        'client_id'            => env('GOOGLE_CLIENT_ID'),
        'client_secret'        => env('GOOGLE_CLIENT_SECRET'),
        'developer_key'        => env('GOOGLE_DEVELOPER_KEY'),
        'redirect'             => env('SOCIALITE_GOOGLE_CALLBACK')
    ]

];
```

### Step 6

[](#step-6)

Configure plugin NOTE: Make sure default role is present in database (If you want you can also use `gurinder/laravel-acl`)

```
return [
    // Open or Close Registration
    'registration_open'              => true,

    // Name fields to Register, make sure it matches with your user model
    'registration_name_fields'       => [
        // 'name'
        'first_name',
        'last_name',
    ],

    // validation rules for registeration
    // Note: Do not delete data field, its required for registration
    'registration_validateion_rules' => [
        'first_name' => 'required|string',
        'last_name'  => 'required|string',
        'email'      => 'required|string|email|max:255|unique:users',
        'password'   => 'required|string|min:6|max:255|confirmed',
        'data'       => 'string' // Do not delete this field
    ],

    // Redirect path after user is successfulle logged in
    'redirect_path_after_login' => '/login-successful',

    // Redirect path after user is successfulle reseted password
    'redirect_path_after_password_reset' => '/password-reset-done',

    // Redirect path after user registered and email confiremed via mail
    'redirect_path_after_email_confirmation' => '/email-is-confirmed',

    // User model must have a method $user->assignRole($roles)
    // in order to this works
    // And it must accept role slug, role id, roles array, role instance
    // NOTE -> make sure this role exist in database
    'default_roles'                          => ['subscriber'],

    // Email configuration to send welcome and confirmation(email) emails to user
    'email_from' => [
        'name'  => 'Gurinder Laravel Auth',
        'email' => 'noreply@example.com'
    ]

];
```

Login Process
-------------

[](#login-process)

- User come to login page
- On filling up login form, user will be redirected to `redirect_path_after_login`
- Or if user click social provider, and user email already exists, then also user will be logged in and redirected to `redirect_path_after_login`

Registeration Process
---------------------

[](#registeration-process)

- User come to registeration page
- On filling up registeration form, user will be sent Email Confirmation to confirm email
- On Email confirmation, user will be redirected to `redirect_path_after_email_confirmation`
- Or if user click social provider,
- Case 1. if user email already exists, then also user will be logged in and redirected to `redirect_path_after_login`
- Case 2. after social provider callback, new user will be redirected to view to choose password and on completion user will be logged in and email will be automatically verified and redirected to `redirect_path_after_login`

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~10 days

Total

5

Last Release

2851d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c9cc3c784200fadc9ddae40aee1c7636897afbcb26082122a1ede305e66465b?d=identicon)[gurindersingh](/maintainers/gurindersingh)

---

Top Contributors

[![gurindersingh](https://avatars.githubusercontent.com/u/6223752?v=4)](https://github.com/gurindersingh "gurindersingh (19 commits)")

---

Tags

laravelsocialiteauthenticate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gurinder-laravel-auth/health.svg)

```
[![Health](https://phpackages.com/badges/gurinder-laravel-auth/health.svg)](https://phpackages.com/packages/gurinder-laravel-auth)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)

PHPackages © 2026

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