PHPackages                             socialiteproviders/line - 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. socialiteproviders/line

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

socialiteproviders/line
=======================

Line Provider for Laravel Socialite

4.1.0(5y ago)161.0M—0.7%9[1 issues](https://github.com/SocialiteProviders/Line/issues)3MITPHPPHP ^7.2 || ^8.0

Since Feb 20Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/SocialiteProviders/Line)[ Packagist](https://packagist.org/packages/socialiteproviders/line)[ RSS](/packages/socialiteproviders-line/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (3)

Line
====

[](#line)

```
composer require socialiteproviders/line
```

Installation &amp; Basic Usage
------------------------------

[](#installation--basic-usage)

Please see the [Base Installation Guide](https://socialiteproviders.com/usage/), then follow the provider specific instructions below.

### Add configuration to `config/services.php`

[](#add-configuration-to-configservicesphp)

```
'line' => [
  'client_id' => env('LINE_CLIENT_ID'),
  'client_secret' => env('LINE_CLIENT_SECRET'),
  'redirect' => env('LINE_REDIRECT_URI'),
  'bot_prompt' => env('LINE_BOT_PROMPT', 'normal'),
],
```

### Add provider event listener

[](#add-provider-event-listener)

#### Laravel 11+

[](#laravel-11)

In Laravel 11, the default `EventServiceProvider` provider was removed. Instead, add the listener using the `listen` method on the `Event` facade, in your `AppServiceProvider` `boot` method.

- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('line', \SocialiteProviders\Line\Provider::class);
});
```

Laravel 10 or below Configure the package's listener to listen for `SocialiteWasCalled` events. Add the event to your `listen[]` array in `app/Providers/EventServiceProvider`. See the [Base Installation Guide](https://socialiteproviders.com/usage/) for detailed instructions.

```
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\Line\LineExtendSocialite::class.'@handle',
    ],
];
```

### Usage

[](#usage)

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

```
return Socialite::driver('line')->redirect();
```

### Returned User fields

[](#returned-user-fields)

- `id`
- `name`
- `avatar`
- `email`

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance54

Moderate activity, may be stable

Popularity49

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity72

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~275 days

Recently: every ~342 days

Total

6

Last Release

1994d ago

Major Versions

v1.0.1 → v2.0.02018-05-30

v2.1 → 4.0.02020-10-25

PHP version history (3 changes)v1.0.0PHP ^5.6 || ^7.0

4.0.0PHP ^7.2

4.1.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

---

Top Contributors

[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (16 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (10 commits)")[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (2 commits)")[![harunbu](https://avatars.githubusercontent.com/u/16379792?v=4)](https://github.com/harunbu "harunbu (2 commits)")[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (1 commits)")[![maks-oleksyuk](https://avatars.githubusercontent.com/u/90793591?v=4)](https://github.com/maks-oleksyuk "maks-oleksyuk (1 commits)")[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (1 commits)")[![mix5003](https://avatars.githubusercontent.com/u/1129524?v=4)](https://github.com/mix5003 "mix5003 (1 commits)")[![s950329](https://avatars.githubusercontent.com/u/13188254?v=4)](https://github.com/s950329 "s950329 (1 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (1 commits)")[![saundefined](https://avatars.githubusercontent.com/u/4685504?v=4)](https://github.com/saundefined "saundefined (1 commits)")[![brendaniel](https://avatars.githubusercontent.com/u/95117617?v=4)](https://github.com/brendaniel "brendaniel (1 commits)")[![jeremy5189](https://avatars.githubusercontent.com/u/1984426?v=4)](https://github.com/jeremy5189 "jeremy5189 (1 commits)")[![kailichiang](https://avatars.githubusercontent.com/u/6218405?v=4)](https://github.com/kailichiang "kailichiang (1 commits)")

---

Tags

laraveloauthoauth1oauth2social-mediasocialitesocialite-providers

### Embed Badge

![Health badge](/badges/socialiteproviders-line/health.svg)

```
[![Health](https://phpackages.com/badges/socialiteproviders-line/health.svg)](https://phpackages.com/packages/socialiteproviders-line)
```

###  Alternatives

[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

618.4M8](/packages/socialiteproviders-apple)[socialiteproviders/instagram

Instagram OAuth2 Provider for Laravel Socialite

421.9M5](/packages/socialiteproviders-instagram)[socialiteproviders/microsoft-azure

Microsoft Azure OAuth2 Provider for Laravel Socialite

556.0M19](/packages/socialiteproviders-microsoft-azure)[socialiteproviders/laravelpassport

LaravelPassport OAuth2 Provider for Laravel Socialite

621.3M7](/packages/socialiteproviders-laravelpassport)[socialiteproviders/discord

Discord OAuth2 Provider for Laravel Socialite

422.0M17](/packages/socialiteproviders-discord)

PHPackages © 2026

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