PHPackages                             alexsoft/laravel-socialite-bitbucket - 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. alexsoft/laravel-socialite-bitbucket

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

alexsoft/laravel-socialite-bitbucket
====================================

Bitbucket OAuth2 Provider for Laravel Socialite

v2.0.1(9y ago)49711MITPHPPHP &gt;=7.0.0

Since Sep 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/alexsoft/Laravel-Socialite-Bitbucket)[ Packagist](https://packagist.org/packages/alexsoft/laravel-socialite-bitbucket)[ RSS](/packages/alexsoft-laravel-socialite-bitbucket/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Disclaimer
==========

[](#disclaimer)

**Laravel Socialite itself supports Bitbucket oAuth 2. It is strongly recommended to use it. ****This is deprecated now.**

Bitbucket OAuth2 Provider for Laravel Socialite
===============================================

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

[![Packagist](https://camo.githubusercontent.com/3076fc7efb763eede964991e5d46b3a9c664d9ea0df2f411a23c140854ea6e71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6578736f66742f6c61726176656c2d736f6369616c6974652d6269746275636b65742e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/alexsoft/laravel-socialite-bitbucket)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/d31d8383570d06dd6bfda86922ea97d6830d195c1d35562fe4b0b75498f8c99c/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373534333432322f736869656c64)](https://styleci.io/repos/67543422)

This package allows you to use Laravel Socialite using OAuth 2 of Bitbucket.

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

[](#installation)

You can install the package via composer:

---

### Laravel 5.4+

[](#laravel-54)

```
composer require alexsoft/laravel-socialite-bitbucket

```

### Laravel 5.0 - 5.3

[](#laravel-50---53)

You will need to use 1.0 version. Usage remains the same.

```
composer require alexsoft/laravel-socialite-bitbucket:^1.0

```

---

**Note:** if you use Laravel 5.5+ you can skip service provider registration, because it should be auto discovered.

Then you should register service provider in your `config/app.php` file:

```
'providers' => [
    // Other service providers

    Alexsoft\LaravelSocialiteBitbucket\Provider::class,

]
```

You will also need to add credentials for the OAuth application that you can get on the Oauth settings page of you Bitbucket account. They should be placed in your `config/services.php` file. You may copy the example configuration below to get started:

```
'bitbucket' => [
    'client_id' => env('BITBUCKET_CLIENT_ID'),
    'client_secret' => env('BITBUCKET_CLIENT_SECRET'),
    'redirect' => env('BITBUCKET_REDIRECT'),
],
```

Basic usage
-----------

[](#basic-usage)

So now, you are ready to authenticate users! You will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from the provider after authentication. We will access Socialite using the Socialite facade:

```
