New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mpociot/socialite-slack

Slack OAuth2 Provider for Laravel Socialite
25,870 18

Larablocks Analysis

mpociot/socialite-slack works with any PHP project: the latest release (1.2, Aug 17, 2017) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Aug 17, 2017)
  • 3 downloads a month (needs 10,000)
  • 18 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Aug 17, 2017.
  • No releases in the last 12 months.
  • First released: May 25, 2016.
  • Monthly downloads: 3, down 92% from six months ago.
  • 2 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require mpociot/socialite-slack
Latest Version:1.2
PHP:^5.6 || ^7.0
License:MIT
Last Updated:Nov 16, 2022
Links: GitHub  ·  Packagist
Maintainer: mpociot

Slack OAuth2 Provider for Laravel Socialite

Documentation

This package makes use of the SocialiteProviders package located here.

Install the package

composer require mpociot/socialite-slack

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

  • Add SocialiteProviders\Manager\SocialiteWasCalled event to your listen[] array in <app_name>/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

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
// other values above
SLACK_KEY=yourkeyfortheservice
SLACK_SECRET=yoursecretfortheservice
SLACK_REDIRECT_URI=https://example.com/login   
Append to config/services.php

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

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

MIT :)

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP License
1.2 ^5.6 || ^7.0 MIT
1.1 ^5.6 || ^7.0 MIT
1.0 ^5.6 || ^7.0 MIT