new LineLogin(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Methods
(static) _random() → {Number}
Method to generate random string.
- Source:
Returns:
- Type
- Number
auth() → {function}
Middlware to initiate OAuth2 flow by redirecting user to LINE authorization endpoint.
Mount this middleware to the path you like to initiate authorization.
- Source:
Returns:
- Type
- function
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:
get_friendship_status(access_token) → {Object}
Method to get the friendship status of the user and the bot linked to your LNIE Login channel.
Parameters:
Name | Type | Description |
---|---|---|
access_token |
String | Access token. |
- Source:
Returns:
- Type
- Object
get_user_profile(access_token) → {Object}
Method to get user's display name, profile image, and status message.
Parameters:
Name | Type | Description |
---|---|---|
access_token |
String | Access token. |
- Source:
Returns:
- Type
- Object
issue_access_token(code) → {Object}
Method to retrieve access token using authorization code.
Parameters:
Name | Type | Description |
---|---|---|
code |
String | Authorization code |
- Source:
Returns:
- Type
- Object
make_auth_url(nonceopt) → {String}
Method to make authorization URL
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
nonce |
String |
<optional> |
A string used to prevent replay attacks. This value is returned in an ID token. |
- Source:
Returns:
- Type
- String
refresh_access_token(refresh_token) → {Object}
Method to get a new access token using a refresh token.
Parameters:
Name | Type | Description |
---|---|---|
refresh_token |
String | Refresh token. |
- Source:
Returns:
- Type
- Object
revoke_access_token(access_token) → {Null}
Method to invalidate the access token.
Parameters:
Name | Type | Description |
---|---|---|
access_token |
String | Access token. |
- Source:
Returns:
- Type
- Null
verify_access_token(access_token) → {Object}
Method to verify the access token.
Parameters:
Name | Type | Description |
---|---|---|
access_token |
String | Access token |
- Source:
Returns:
- Type
- Object