PHPackages                             wilkques/line-login-sdk-php - 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. wilkques/line-login-sdk-php

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

wilkques/line-login-sdk-php
===========================

LINE Login SDK for PHP

v6.0.0(1y ago)1307MITPHPPHP &gt;=8.2

Since May 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wilkques/line-login-sdk-php)[ Packagist](https://packagist.org/packages/wilkques/line-login-sdk-php)[ RSS](/packages/wilkques-line-login-sdk-php/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (2)Versions (9)Used By (0)

Line Login for PHP
==================

[](#line-login-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/c1d89978174806bde0706f0153176adefea97a6f3b83bd9b665c54592c9bafcf/68747470733a2f2f706f7365722e707567782e6f72672f77696c6b717565732f6c696e652d6c6f67696e2d73646b2d7068702f762f737461626c65)](https://packagist.org/packages/wilkques/line-login-sdk-php)[![License](https://camo.githubusercontent.com/d098ff2bda00b53639fbf8b296b9501eb6dfc9ebc49ec6d704cef4c8ab1b41c0/68747470733a2f2f706f7365722e707567782e6f72672f77696c6b717565732f6c696e652d6c6f67696e2d73646b2d7068702f6c6963656e7365)](https://packagist.org/packages/wilkques/line-login-sdk-php)

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

[](#installation)

```
composer require wilkques/line-login-sdk-php

```

[Scopes](#REFERENCE)
--------------------

[](#scopes)

ScopeProfileID Token
(including user ID)Display name
in ID tokenProfile image URL
in ID tokenEmail address
in ID tokenprofile✓----profile%20openid✓✓✓✓-profile%20openid%20email✓✓✓✓✓（※）openid-✓---openid%20email-✓--✓（※）How to use
----------

[](#how-to-use)

1. Authorization

    ```
    use Wilkques\LINE\LINE;

    $line = new LINE('');
    // or
    $line = LINE::clientId('');

    $code = $_GET['code'] ?? null;

    if ($code) {
        $token = $line->clientSecret('')->token($code, '');

        $userProfile = $line->userProfile($token->accessToken());

        exit;
    }

    $url = $line->generateLoginUrl([
        // Callback URL: https://developers.line.biz/console/channel//line-login
        'https://yourdomain.com',
        // Permissions requested from the user: https://developers.line.biz/en/docs/line-login/integrate-line-login/#scopes
        [
            'profile', 'openid', 'email'
        ]
    ]);

    // or

    $url = $line->generateLoginUrl([
        // Callback URL: https://developers.line.biz/console/channel//line-login
        'redirect_uri'  => $url,
        // Permissions requested from the user: https://developers.line.biz/en/docs/line-login/integrate-line-login/#scopes
        'scope'         => ['openid', 'openid']
    ]);

    header('Location: '.$url);
    ```
2. PKCE Authorization

    1. command `composer require wilkques/pkce-php` [wilkques/pkce-php](https://github.com/wilkques/pkce-php)
    2. ```
        use Wilkques\LINE\LINE;
        use Wilkques\PKCE\Generator;

        $line = new LINE('');
        // or
        $line = LINE::clientId('');

        $pkce = Generator::generate();

        $code = $_GET['code'] ?? null;

        if ($code) {
            $codeVerifier = $_GET['state'] ?? null;

            $token = $line->clientSecret('')->token($code, '', $codeVerifier);

            $userProfile = $line->userProfile($token->accessToken());

            exit;
        }

        $codeVerifier = $pkce->getCodeVerifier();

        $codeChallenge = $pkce->getCodeChallenge();

        $url = $line->generatePKCELoginUrl([
            // Callback URL: https://developers.line.biz/console/channel//line-login
            'https://yourdomain.com',
            // Permissions requested from the user: https://developers.line.biz/en/docs/line-login/integrate-line-login/#scopes
            [
                'profile', 'openid', 'email'
            ],
            $codeVerifier,
            $codeChallenge
        ]);

        // or

        $url = $line->generatePKCELoginUrl([
            // Callback URL: https://developers.line.biz/console/channel//line-login
            'redirect_uri'      => $url,
            // Permissions requested from the user: https://developers.line.biz/en/docs/line-login/integrate-line-login/#scopes
            'scope'             => ['openid', 'openid'],
            'state'             => $codeVerifier,
            'code_challenge'    => $codeChallenge,
        ]);

        header('Location: '.$url);
        ```

Client CURL Setting
-------------------

[](#client-curl-setting)

1. `setCurlOption` PHP CURL Setting

    ```
    $line->setCurlOption(, );

    // e.g.

    $line->setCurlOption(CURLOPT_TIMEOUT, 100);
    ```

REFERENCE
---------

[](#reference)

1. [Official](https://developers.line.biz/en/reference/line-login/)
2. [LINE Login Official](https://developers.line.biz/en/docs/line-login/integrate-line-login/#making-an-authorization-request)
3. [PKCE support for LINE Login](https://developers.line.biz/en/docs/line-login/integrate-pkce/)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance42

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~148 days

Recently: every ~257 days

Total

8

Last Release

469d ago

Major Versions

v1.0.0 → v2.0.02022-05-18

v2.1.1 → v3.1.52022-05-27

v3.2.5 → v5.1.12023-07-25

v5.1.1 → v6.0.02025-03-21

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v6.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/906e907ec7e3dbe49f32aebd0f36488176d3736a65d38675753ba9a6a21017b6?d=identicon)[wilkques](/maintainers/wilkques)

---

Top Contributors

[![wilkques](https://avatars.githubusercontent.com/u/51186879?v=4)](https://github.com/wilkques "wilkques (36 commits)")

### Embed Badge

![Health badge](/badges/wilkques-line-login-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/wilkques-line-login-sdk-php/health.svg)](https://phpackages.com/packages/wilkques-line-login-sdk-php)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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