line-oauth
An implementation of the LINE OAuth flow. See the Meteor Guide for more details.
Configuration
Sample configuration on your server:
1ServiceConfiguration.configurations.upsert( 2 { service: 'line' }, 3 { 4 $set: { 5 loginStyle: 'popup', 6 scope: ['profile', 'openid', 'email'], 7 channelId: Meteor.settings.packages?.services?.line?.channelId, 8 secret: Meteor.settings.packages?.services?.line?.secret 9 } 10 } 11)
OR via settings json:
1{ 2 "packages": { 3 "service-configuration": { 4 "line": { 5 "loginStyle": "popup", 6 "scope": ["profile", "openid", "email"], 7 "channelId": "youChannelId", 8 "secret": "yourSecretCode" 9 } 10 } 11 } 12}
loginStyle
Login style, either popup or redirect. popup is the recommended method.
scope
What information you want to request from LINE. More details at LINE documentation
channelId
Your channel ID from LINE Developer's console.
secret
Your app secret from LINE Developer's console.
Options (client-side)
loginStyle
You can override the login style.
botPrompt
Set this if you want to show to the user on login the option to add your channel to their friends. More at LINE documentation.
uiLocales
Display language for LINE Login screens. Specify as one or more RFC 5646 (BCP 47) language tags, separated by spaces, in order of preference. Corresponds to the ui_locales parameter defined in the "Authentication Request" section of OpenID Connect Core 1.0.
Calling login
Like with all other Meteor logins, you can call the LINE login with Meteor.loginWithLine to which you pass options and callback method:
1Meteor.loginWithLine( 2 { loginStyle: 'popup', botPrompt: 'normal' }, 3 (error) => { 4 if (error) {/* handle error */} 5 if (!error) {/* user is loged in, redirect to their dashboard or other action */} 6 } 7)
Integrations
Meteor Link Accounts
This package is part of bozhao:link-accounts package that allows you to link multiple login accounts for your account.