PHPackages                             dotkernel/dot-auth-social - 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. dotkernel/dot-auth-social

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

dotkernel/dot-auth-social
=========================

Authentication wrapper for social providers

1.5.0(7mo ago)41.3k1MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI failing

Since Nov 16Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/dotkernel/dot-auth-social)[ Packagist](https://packagist.org/packages/dotkernel/dot-auth-social)[ Docs](https://github.com/dotkernel/dot-auth-social)[ RSS](/packages/dotkernel-dot-auth-social/feed)WikiDiscussions 1.0 Synced 3w ago

READMEChangelog (10)Dependencies (7)Versions (16)Used By (0)

dot-auth-social
===============

[](#dot-auth-social)

Dotkernel's component, used to authenticate users through Facebook and return credentials and user details.

> dot-auth-social is a wrapper on top of [thephpleague/oauth2-client](https://github.com/thephpleague/oauth2-client) social providers.

Documentation
-------------

[](#documentation)

Documentation is available at: .

Badges
------

[](#badges)

[![OSS Lifecycle](https://camo.githubusercontent.com/8754ea156354c513c27f307e7f637ac619a74c7238ac945bb2d9539b7f7c3007/68747470733a2f2f696d672e736869656c64732e696f2f6f73736c6966656379636c652f646f746b65726e656c2f646f742d617574682d736f6369616c)](https://camo.githubusercontent.com/8754ea156354c513c27f307e7f637ac619a74c7238ac945bb2d9539b7f7c3007/68747470733a2f2f696d672e736869656c64732e696f2f6f73736c6966656379636c652f646f746b65726e656c2f646f742d617574682d736f6369616c)[![PHP from Packagist (specify version)](https://camo.githubusercontent.com/050ed59485232e2b101c04c1c93ea9d1d7fda78c28f5a11d51fe07e298943b54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f746b65726e656c2f646f742d617574682d736f6369616c2f312e352e30)](https://camo.githubusercontent.com/050ed59485232e2b101c04c1c93ea9d1d7fda78c28f5a11d51fe07e298943b54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f746b65726e656c2f646f742d617574682d736f6369616c2f312e352e30)

[![GitHub issues](https://camo.githubusercontent.com/31bf7fbd382b25ad3d10aee586f4984d01e3da42939f29a9bef87a7ad6d77302/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f646f746b65726e656c2f646f742d617574682d736f6369616c)](https://github.com/dotkernel/dot-auth-social/issues)[![GitHub forks](https://camo.githubusercontent.com/56c5adfdc96e507302e22be4b1532e85094800d7d007fc55fc96b96abc0fcca3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f646f746b65726e656c2f646f742d617574682d736f6369616c)](https://github.com/dotkernel/dot-auth-social/network)[![GitHub stars](https://camo.githubusercontent.com/d70ccb8e4f0d07334224a6fd36f71965728cd53fb27a231a103c1377d4e67f75/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f646f746b65726e656c2f646f742d617574682d736f6369616c)](https://github.com/dotkernel/dot-auth-social/stargazers)[![GitHub license](https://camo.githubusercontent.com/a1eb0663b22bad636e4bede3fdb05ea839810dcd24550eabbb90ec94ca87bcd5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646f746b65726e656c2f646f742d617574682d736f6369616c)](https://github.com/dotkernel/dot-auth-social/blob/1.0/LICENSE.md)

[![Build Static](https://github.com/dotkernel/dot-auth-social/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-auth-social/actions/workflows/continuous-integration.yml)[![codecov](https://camo.githubusercontent.com/d1d0ec69f849666a77a05638d415c0d30833ca5eecce30b667025c329827ff51/68747470733a2f2f636f6465636f762e696f2f67682f646f746b65726e656c2f646f742d617574682d736f6369616c2f67726170682f62616467652e7376673f746f6b656e3d5649484e31484b384452)](https://codecov.io/gh/dotkernel/dot-auth-social)[![PHPStan](https://github.com/dotkernel/dot-auth-social/actions/workflows/static-analysis.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-auth-social/actions/workflows/static-analysis.yml)

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

[](#requirements)

- **PHP**: 8.2, 8.3, 8.4 or 8.5

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

[](#installation)

Run the following command in your project directory:

```
composer require dotkernel/dot-auth-social
```

After installing, add the `ConfigProvider` class to your configuration aggregate.

Create a new file `social-authentication.global.php` in `config/autoload` with the following contents:

```
return [
    'social_authentication' => [
        'facebook' => [
            'client_id' => '',
            'client_secret' => '',
            'redirect_uri' => '',
            'graph_api_version' => '',
        ]
    ]
];
```

> Make sure to populate the array with your credentials.

Usage
-----

[](#usage)

In this example we will create a new controller, but you can use an existing one too.

```
