PHPackages                             friendsofcat/github-team-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. friendsofcat/github-team-auth

ActiveLibrary

friendsofcat/github-team-auth
=============================

Git hub log in tool

2.1(6y ago)0425[1 issues](https://github.com/friendsofcat/github-team-auth/issues)[1 PRs](https://github.com/friendsofcat/github-team-auth/pulls)MITPHPPHP &gt;=5.5.9

Since Sep 18Pushed 6y ago2 watchersCompare

[ Source](https://github.com/friendsofcat/github-team-auth)[ Packagist](https://packagist.org/packages/friendsofcat/github-team-auth)[ RSS](/packages/friendsofcat-github-team-auth/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (5)Dependencies (12)Versions (8)Used By (0)

GitHubLogin
===========

[](#githublogin)

[![Build Status](https://camo.githubusercontent.com/0138fe12ca5f12cc70c30925330417864986f399dbc49a9d4feef739cffa05fb/68747470733a2f2f7472617669732d63692e6f72672f667269656e64736f666361742f6769746875622d7465616d2d617574682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/friendsofcat/github-team-auth)

[![Coverage Status](https://camo.githubusercontent.com/664b19c58c1561449be3f7617e8c17ee00c36f09a86072d48b5a836ebf0f49e7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f667269656e64736f666361742f6769746875622d7465616d2d617574682f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/friendsofcat/github-team-auth?branch=master)

Overview
--------

[](#overview)

The GitHubLogin is a Laravel package which uses the socialite() to login a user by getting his github user account and permission. It basically get a github account and validate if the use is part of the expected organization and teams, and send a event with the user data. The expected organization and teams must be populated in database, which is possible to do by UI (See the UI section for more information).

Requirements
------------

[](#requirements)

```
"require": {
    "php": ">=5.5.9",
    "illuminate/support": "5.*",
    "laravel/socialite": "^3.0@dev",
    "knplabs/github-api": "^2.9",
    "php-http/guzzle6-adapter": "^1.1",
    "graham-campbell/github": "^7.4"
  }

```

Install
-------

[](#install)

Composer install

```
composer require friendsofcat/github-team-auth

```

Publish config File

```
 php artisan vendor:publish

```

Publish config file

```
php artisan vendor:publish --provider="Friendsofcat\GitHubTeamAuth\GitHubTeamAuthProvider" --tag='github_team_auth:config'

```

The config file has only onw parameter, team\_table\_name, which define the name of the table in database for githubteams names, the default value is 'teams'

The config file has only onw parameter, custom\_redirect, which define where we should redirect.

Publish migrations

```
php artisan vendor:publish --provider="Friendsofcat\GitHubTeamAuth\GitHubTeamAuthProvider" --tag='github_team_auth:migrations'

```

Publish views

```
php artisan vendor:publish --provider="Friendsofcat\GitHubTeamAuth\GitHubTeamAuthProvider" --tag='github_team_auth:views'

```

Edit app/config/service.php to add the code below

```
    'github' => [
        'client_id' => env('GITHUB_CLIENT_ID'),
        'client_secret' => env('GITHUB_CLIENT_SECRET'),
        'redirect' =>   'https://cat-quality-service.test/auth/github/callback',
    ],

```

Env file For service.php configurations is necessary to inform:

- GITHUB\_CLIENT\_ID
- GITHUB\_CLIENT\_SECRET
- redirect ( whihc must be https://{{APP\_NAME}}/auth/github/callback ).

You can get all these parameters after register the app in the github callback feature.

View to Manage Organization and orgs
------------------------------------

[](#view-to-manage-organization-and-orgs)

### https://{domain}/admin/github-team-auth

[](#httpsdomainadmingithub-team-auth)

This is the dashboard page which list all the team and orgs from this page you are able to delete an organization or team. Also you can navaguete to create team or create organization screen.

### https://{domain}/admin/github-team-auth/add/team

[](#httpsdomainadmingithub-team-authaddteam)

This page was design for add a new team, display the team possibilities using the github token storaged in cache when user logged in. Also allow the user add a tag for label the access level of team, it can be add by the 'acl' field.

### https://{domain}/admin/github-team-auth/add/org

[](#httpsdomainadmingithub-team-authaddorg)

This page was design for add a new team, display the organization possibilities using the github token storaged in cache when user logged in.

Event
-----

[](#event)

In the end of process the user will be login and an event will be trigger. This event has to public parameters:

- user\_github\_object ( \\Laravel\\Socialite\\Two\\User )

    ```
      Which contain all the user information.

    ```
- user\_team\_array ( array )

    ```
      An array with all the teams which this user is part of.

    ```

HTML
----

[](#html)

You must add the git hub loggin button in your login page, as the example below:

```

    &nbsp;GitHub

@if ($errors->has('github'))

        {{ $errors->first('github') }}

@endif

```

Chicken - Egg dilemma
---------------------

[](#chicken---egg-dilemma)

For add a new Organization/Team the user need to be logged at the system, but for loggin the system must have some vaid organization and team in DB. To solve this problem create a migration and insert the basic organization and team.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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 ~136 days

Total

5

Last Release

2253d ago

Major Versions

V1.2 → 2.02020-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/da51f2fb140a4e118e94dd59ff819c11dd9a656b9c0ff8b2074c5fd2c07978ee?d=identicon)[alnutile](/maintainers/alnutile)

![](https://www.gravatar.com/avatar/897a20ecccb931110423981826453afcc1ad0eb148ead352e2e705679821121b?d=identicon)[damiankloip](/maintainers/damiankloip)

![](https://www.gravatar.com/avatar/5f4ecb02d128ce6a62f06db86693fc6224accc7dccf8a30fec1ebf490a6457b5?d=identicon)[luiz.albertoni](/maintainers/luiz.albertoni)

---

Top Contributors

[![luiz-albertoni](https://avatars.githubusercontent.com/u/14180436?v=4)](https://github.com/luiz-albertoni "luiz-albertoni (15 commits)")[![alnutile](https://avatars.githubusercontent.com/u/365385?v=4)](https://github.com/alnutile "alnutile (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/friendsofcat-github-team-auth/health.svg)

```
[![Health](https://phpackages.com/badges/friendsofcat-github-team-auth/health.svg)](https://phpackages.com/packages/friendsofcat-github-team-auth)
```

###  Alternatives

[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42442.0M544](/packages/socialiteproviders-manager)[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)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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