PHPackages                             mpociot/socialite-slack - 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. mpociot/socialite-slack

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

mpociot/socialite-slack
=======================

Slack OAuth2 Provider for Laravel Socialite

1.2(8y ago)1825.7k8[1 issues](https://github.com/mpociot/socialite-slack/issues)[1 PRs](https://github.com/mpociot/socialite-slack/pulls)MITPHPPHP ^5.6 || ^7.0

Since May 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mpociot/socialite-slack)[ Packagist](https://packagist.org/packages/mpociot/socialite-slack)[ RSS](/packages/mpociot-socialite-slack/feed)WikiDiscussions master Synced 4w ago

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

Slack OAuth2 Provider for Laravel Socialite
===========================================

[](#slack-oauth2-provider-for-laravel-socialite)

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

[](#documentation)

This package makes use of the `SocialiteProviders` package located [here](http://socialiteproviders.github.io/).

### Install the package

[](#install-the-package)

```
composer require mpociot/socialite-slack
```

### Install the Service Provider

[](#install-the-service-provider)

- Remove `Laravel\Socialite\SocialiteServiceProvider` from your providers\[\] array in config\\app.php if you have added it already.
- Add `\SocialiteProviders\Manager\ServiceProvider::class` to your providers\[\] array in config\\app.php.

### Install the event listener

[](#install-the-event-listener)

- Add `SocialiteProviders\Manager\SocialiteWasCalled` event to your listen\[\] array in `/Providers/EventServiceProvider`.
- The listener that you add for this provider is `'Mpociot\Socialite\Slack\SlackExtendSocialite@handle',`.

For example:

```
/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // add your listeners (aka providers) here
        'Mpociot\Socialite\Slack\SlackExtendSocialite@handle',
    ],
];
```

### Environment variables

[](#environment-variables)

If you add environment values to your `.env` as exactly shown below, you do not need to add an entry to the services array.

#### Append to .env

[](#append-to-env)

```
// other values above
SLACK_KEY=yourkeyfortheservice
SLACK_SECRET=yoursecretfortheservice
SLACK_REDIRECT_URI=https://example.com/login

```

#### Append to config/services.php

[](#append-to-configservicesphp)

You do not need to add this if you add the values to the `.env` exactly as shown above. The values below are provided as a convenience in the case that a developer is not able to use the .env method

```
'slack' => [
    'client_id' => env('SLACK_KEY'),
    'client_secret' => env('SLACK_SECRET'),
    'redirect' => env('SLACK_REDIRECT_URI'),
],
```

Usage
-----

[](#usage)

Redirect to Slack with the scopes you want to access:

```
return Socialite::with('slack')->scopes([
	'identity.basic',
	'identity.email',
	'identity.team',
	'identity.avatar'
])->redirect();
```

License
-------

[](#license)

MIT :)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~224 days

Total

3

Last Release

3238d ago

### Community

Maintainers

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

---

Top Contributors

[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (6 commits)")[![adammatysiak](https://avatars.githubusercontent.com/u/25105267?v=4)](https://github.com/adammatysiak "adammatysiak (1 commits)")

### Embed Badge

![Health badge](/badges/mpociot-socialite-slack/health.svg)

```
[![Health](https://phpackages.com/badges/mpociot-socialite-slack/health.svg)](https://phpackages.com/packages/mpociot-socialite-slack)
```

###  Alternatives

[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

599.1M13](/packages/socialiteproviders-apple)[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

346.9M19](/packages/socialiteproviders-microsoft)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

401.9M5](/packages/socialiteproviders-instagram)[socialiteproviders/microsoft-azure

Microsoft Azure OAuth2 Provider for Laravel Socialite

566.8M24](/packages/socialiteproviders-microsoft-azure)[socialiteproviders/laravelpassport

LaravelPassport OAuth2 Provider for Laravel Socialite

621.3M8](/packages/socialiteproviders-laravelpassport)[socialiteproviders/discord

Discord OAuth2 Provider for Laravel Socialite

422.3M21](/packages/socialiteproviders-discord)

PHPackages © 2026

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