PHPackages                             purinwang/line\_login - 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. purinwang/line\_login

ActiveLibrary

purinwang/line\_login
=====================

line\_login V2.1

0.0.2(3y ago)08MITPHP

Since Jun 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/PurinWang/Line_Login)[ Packagist](https://packagist.org/packages/purinwang/line_login)[ RSS](/packages/purinwang-line-login/feed)WikiDiscussions main Synced 1mo ago

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

Line Login
==========

[](#line-login)

[Packagist Link](https://packagist.org/packages/purinwang/line_login#0.0.0)

```
composer require purinwang/line_login

```

Require
-------

[](#require)

- php &gt;= 5.6
- line login 2.1

Flow
----

[](#flow)

1. Set `ConfigManager`, default use .env to setting

    > Could rename .env.example to .env
2. Use `LineAuthorization` to get **Line Login** url, then redriect to **Line Login** page
3. After click login, it will callback to `line_redirect_uri` and use `Get Method` return `code` parameter

    > The .env `line_redirect_uri` will control Callback url
4. Get User info (Two Way)

    4.1 New `OAuthController`, and use `getAccessToken` with `code` to get user info

    > include `access_token`, expires\_in, `id_token`, `refresh_token`, scope, token\_type

    Then new `LineProfileController`, and use `getUserprofile` with `access_token` to get user detail

    > include `userId`, `displayName`, `pictureUrl`, `statusMessage`

    4.2 New `OAuthController` and use `getDecodeIdData` with `code` to get user info with `email`

    > include `iss`(url), `sub`(UserId), `name`, `picture`, `email`...
    >
    > > If you need to get `email` field, you need to apply permission at [LINE Develope](https://developers.line.biz/zh-hant/docs/line-login/integrate-line-login/#applying-for-email-permission) and use `getDecodeIdData`

Notice
------

[](#notice)

1. some method cloud use detail parameter to get real callback info or it will get a part of function assign data

    ```
    public function getDecodeIdData($code, $detail=false){
        ...

    ```
2. About getDecodeIdData, get `getAccessToken` the `TokenId` is [JWT](JWT.io) format.

    After explode by `.`, it will get three part and encode by base64

    - header
    - payload -&gt; real data
    - signature
3. Example branch is a simple login example

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Total

3

Last Release

1412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d20548ea290b9b44d8b778f677ae0c7607a084615480d72723dcb474ebec9a2?d=identicon)[PurinWang](/maintainers/PurinWang)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[doppar/framework

The Doppar Framework

366.7k8](/packages/doppar-framework)[hardcastle/xrpl_php

PHP SDK / Client for the XRP Ledger

129.7k5](/packages/hardcastle-xrpl-php)

PHPackages © 2026

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