Download the PHP package purinwang/line_login without Composer
On this page you can find all versions of the php package purinwang/line_login. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package line_login
Line Login
Require
- php >= 5.6
-
line login 2.1
Flow
- Set
ConfigManager
, default use .env to settingCould rename .env.example to .env
- Use
LineAuthorization
to get Line Login url, then redriect to Line Login page - After click login, it will callback to
line_redirect_uri
and useGet Method
returncode
parameterThe .env
line_redirect_uri
will control Callback url - Get User info (Two Way)
4.1 New
OAuthController
, and usegetAccessToken
withcode
to get user infoinclude
access_token
, expires_in,id_token
,refresh_token
, scope, token_typeThen new
LineProfileController
, and usegetUserprofile
withaccess_token
to get user detailinclude
userId
,displayName
,pictureUrl
,statusMessage
4.2 New
OAuthController
and usegetDecodeIdData
withcode
to get user info withemail
include
iss
(url),sub
(UserId),name
,picture
,email
...If you need to get
email
field, you need to apply permission at LINE Develope and usegetDecodeIdData
- Set
Notice
-
some method cloud use detail parameter to get real callback info or it will get a part of function assign data
-
About getDecodeIdData, get
getAccessToken
theTokenId
is JWT format.After explode by
.
, it will get three part and encode by base64- header
- payload -> real data
- signature
- Example branch is a simple login example