PHPackages                             mrstebo/laravel-socialite-xero - 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. mrstebo/laravel-socialite-xero

ActiveLibrary

mrstebo/laravel-socialite-xero
==============================

Xero OAuth2 Provider for Laravel Socialite

v0.1.3(5y ago)032[1 issues](https://github.com/mrstebo/Laravel-Socialite-Xero/issues)MITPHPPHP &gt;=7.0.0

Since Jul 23Pushed 5y agoCompare

[ Source](https://github.com/mrstebo/Laravel-Socialite-Xero)[ Packagist](https://packagist.org/packages/mrstebo/laravel-socialite-xero)[ RSS](/packages/mrstebo-laravel-socialite-xero/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (5)Used By (0)

Laravel-Socialite-Xero
======================

[](#laravel-socialite-xero)

Xero OAuth2 Provider for Laravel Socialite

[![Packagist](https://camo.githubusercontent.com/f92dc426fe77ebaab45bb29a4ef64e0a7fc15084b2ec5c81639ca7cd01df91e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d72737465626f2f6c61726176656c2d736f6369616c6974652d7865726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mrstebo/laravel-socialite-xero)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/99766788d52dd574a55d87ba6cd06143af316f3bc498249bbb5de05e51df3dff/68747470733a2f2f7374796c6563692e696f2f7265706f732f3238313836343732382f736869656c64)](https://styleci.io/repos/281864728)

This package allows you to use Laravel Socialite using Xero.

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

[](#installation)

You can install the package via composer:

```
composer require mrstebo/laravel-socialite-xero
```

---

**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

    Mrstebo\LaravelSocialiteXero\Provider::class,

]
```

You will also need to add credentials for the OAuth application that you can get using the [Xero Developers Portal](https://developer.xero.com/). They should be placed in your `config/services.php` file. You may copy the example configuration below to get started:

```
'xero' => [
    'client_id' => env('XERO_CLIENT_ID'),
    'client_secret' => env('XERO_CLIENT_SECRET'),
    'redirect' => env('XERO_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:

```
