PHPackages                             crowdedlight/izettle-socialite - 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. crowdedlight/izettle-socialite

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

crowdedlight/izettle-socialite
==============================

IZettle OAuth2 Provider for Laravel Socialite

v0.1(8y ago)130MITPHPPHP &gt;=5.5.9

Since Aug 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Crowdedlight/izettle-socialite)[ Packagist](https://packagist.org/packages/crowdedlight/izettle-socialite)[ RSS](/packages/crowdedlight-izettle-socialite/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

IZettle Provider for Laravel Socialite
======================================

[](#izettle-provider-for-laravel-socialite)

Installation and config
-----------------------

[](#installation-and-config)

Install Larvel Socialite (see here: )

Install the IZettle socialite provider

```
composer require crowdedlight/izettle-socialite

```

Add the follwing to your .env file:

```
IZETTLE_CLIENT_ID=
IZETTLE_CLIENT_SECRET=
IZETTLE_USERNAME=
IZETTLE_PASSWORD=
IZETTLE_REDIRECT=

```

### Password Grant

[](#password-grant)

Using the password grant method for private integrations with IZettle be sure to also fill out the `IZETTLE_USERNAME` and `IZETTLE_PASSWORD` fields in .env file. `IZETTLE_REDIRECT` isn't used for password grant.

To use it with password grant just use the following method as it only requires a single interaction with the api. Remember to use `Stateless` as the api doesn't use a `state` for this interaction.

```
    /**
     * Gets the users AccessToken and Refreshtoken from the api.
     *
     *
     */
    public function AuthIzettle()
    {
        $user = Socialite::driver('izettle')->stateless()->user();
        //dd($user);
    }
```

#### Laravel &lt;= 5.4

[](#laravel--54)

Add the following to your config/app.php

```
crowdedlight\Socialite\IZettle\IZettleServiceProvider::class,

```

#### Laravel 5.5

[](#laravel-55)

Service Provider is auto discovered.

Usage
-----

[](#usage)

```
