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

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

socialiteproviders/slack
========================

Slack OAuth2 Provider for Laravel Socialite

5.2.0(8mo ago)13975.0k—7.9%12MITPHPPHP ^8.0

Since Feb 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/SocialiteProviders/Slack)[ Packagist](https://packagist.org/packages/socialiteproviders/slack)[ RSS](/packages/socialiteproviders-slack/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (26)Used By (0)

Slack
=====

[](#slack)

Comparison to offical provider
------------------------------

[](#comparison-to-offical-provider)

Socialite now has an official slack provider, but there are some important differences between the socialite one and the offical one. Namley, this provider allows you to request both user and bot scopes, and thus get both bot tokens and user tokens. See the section below on that.

Installation &amp; Basic Usage
------------------------------

[](#installation--basic-usage)

Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), then follow the provider specific instructions below.

### Add configuration to `config/services.php`

[](#add-configuration-to-configservicesphp)

```
'slack' => [
  'client_id' => env('SLACK_CLIENT_ID'),
  'client_secret' => env('SLACK_CLIENT_SECRET'),
  'redirect' => env('SLACK_REDIRECT_URI')
],
```

### Add provider event listener

[](#add-provider-event-listener)

#### Laravel 11+

[](#laravel-11)

In Laravel 11, the default `EventServiceProvider` provider was removed. Instead, add the listener using the `listen` method on the `Event` facade, in your `AppServiceProvider` `boot` method.

- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('slack', \SocialiteProviders\Slack\Provider::class);
});
```

Laravel 10 or below Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

```
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\Slack\SlackExtendSocialite::class.'@handle',
    ],
];
```

### Usage

[](#usage)

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

```
return Socialite::driver('slack')->redirect();
```

This package allows you to request both bot and user scopes. User scopes are set using the standard `->scopes()` method, and bot scopes are via the `->botScopes()` method.

```
return Socialite::driver('slack')->scopes(['identity.basic', 'identity.email', 'identity.team'])->botScopes(['chat:write','commands'])->redirect();
```

### Returned User fields

[](#returned-user-fields)

- `id`
- `name`
- `email`
- `avatar`
- `organization_id`

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance72

Regular maintenance activity

Popularity47

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~433 days

Total

25

Last Release

266d ago

Major Versions

v1.1.2 → v2.0.02016-03-30

v2.0.1 → v3.0.02017-01-25

v3.1 → 4.0.02020-10-25

4.1.1 → 5.0.02024-01-05

PHP version history (7 changes)v1.0.0PHP &gt;=5.4.0

v1.1.0PHP &gt;=5.5.0

v2.0.0PHP ^5.6 || ^7.0

4.0.0PHP ^7.2

4.1.0PHP ^7.2|^8.0

4.1.1PHP ^7.2 || ^8.0

5.0.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

---

Top Contributors

[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (16 commits)")[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (15 commits)")[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (3 commits)")[![nesk](https://avatars.githubusercontent.com/u/817508?v=4)](https://github.com/nesk "nesk (2 commits)")[![maks-oleksyuk](https://avatars.githubusercontent.com/u/90793591?v=4)](https://github.com/maks-oleksyuk "maks-oleksyuk (1 commits)")[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (1 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (1 commits)")[![saundefined](https://avatars.githubusercontent.com/u/4685504?v=4)](https://github.com/saundefined "saundefined (1 commits)")[![brianwozeniak](https://avatars.githubusercontent.com/u/1310816?v=4)](https://github.com/brianwozeniak "brianwozeniak (1 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (1 commits)")[![maartenpaauw](https://avatars.githubusercontent.com/u/4550875?v=4)](https://github.com/maartenpaauw "maartenpaauw (1 commits)")

---

Tags

laraveloauthoauth1oauth2social-mediasocialitesocialite-providerslaravelslackprovideroauthsocialite

### Embed Badge

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

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

###  Alternatives

[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

421.9M5](/packages/socialiteproviders-instagram)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)[socialiteproviders/kakao

Kakao OAuth2 Provider for Laravel Socialite

10484.7k4](/packages/socialiteproviders-kakao)

PHPackages © 2026

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