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

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

kyoya0819/socialite-slack
=========================

Slack OAuth2 Provider for Laravel Socialite

00PHP

Since Nov 22Pushed 3y agoCompare

[ Source](https://github.com/kyoya0819/socialite-slack)[ Packagist](https://packagist.org/packages/kyoya0819/socialite-slack)[ RSS](/packages/kyoya0819-socialite-slack/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)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 `'Kyoya\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
        'Kyoya\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

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![kyoya0819](https://avatars.githubusercontent.com/u/45027336?v=4)](https://github.com/kyoya0819 "kyoya0819 (6 commits)")[![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/kyoya0819-socialite-slack/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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