Class: LineLogin

LineLogin(options)

new LineLogin(options)

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
channel_id String LINE Channel Id
channel_secret String LINE Channel secret
callback_url String LINE Callback URL
scope String <optional>
"profile openid" Permission to ask user to approve. Supported values are "profile" and "openid".
prompt String <optional>
Used to force the consent screen to be displayed even if the user has already granted all requested permissions. Supported value is "concent".
bot_prompt string <optional>
"normal" Displays an option to add a bot as a friend during login. Set value to either normal or aggressive. Supported values are "normal" and "aggressive".
session_options Object <optional>
Option object for express-session. Refer to https://github.com/expressjs/session for detail.
verify_id_token Boolean <optional>
true Used to verify id token in token response. Default is true.
Properties:
Name Type Description
channel_id String LINE Channel Id
channel_secret String LINE Channel secret
callback_url String LINE Callback URL
scope String Permission to ask user to approve. Supported values are "profile" and "openid".
prompt String Used to force the consent screen to be displayed even if the user has already granted all requested permissions. Supported value is "concent".
bot_prompt string Displays an option to add a bot as a friend during login. Set value to either normal or aggressive. Supported values are "normal" and "aggressive".
session_options Object Option object for express-session. Refer to https://github.com/expressjs/session for detail.
verify_id_token Boolean Used to verify id token in token response. Default is true.
Source:

Methods

auth(nonceopt)

Middlware to initiate OAuth2 flow by redirecting user to LINE authorization endpoint. Mount this middleware to the path you like to initiate authorization.
Parameters:
Name Type Attributes Description
nonce String <optional>
String to prevent reply attack.
Source:

callback(s, f)

Middleware to handle callback after authorization. Mount this middleware to the path corresponding to the value of Callback URL in LINE Developers Console.
Parameters:
Name Type Description
s function Callback function on success.
f function Callback function on failure.
Source: