line/line-login-starter

Name: line-login-starter

Owner: LINE

Description: LINE Login starter application

Created: 2016-05-10 01:41:55.0

Updated: 2018-05-21 07:29:52.0

Pushed: 2018-05-16 07:33:51.0

Homepage: https://developers.line.me/en/docs/line-login/web/try-line-login/

Size: 51

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

LINE Login Starter Application

Build Status

This is a starter application to help you get started on integrating LINE Login into a web app or website. This sample Java application demonstrates how you can use LINE Login to let users log in to your app with their LINE accounts and to get user information.

The following instructions describe how to deploy the app on Heroku, view logs, and modify the app for yourself.

Requirements
Deploy the app on Heroku

Deploy

With the “Deploy to Heroku” button, you can easily deploy the LINE Login starter application to Heroku from your web browser by following the steps below.

  1. Click the Deploy to Heroku button to go to the Heroku Dashboard to configure and deploy the app.
  2. Enter a Heroku app name (optional).
  3. Enter the following Heroku config variables.
    • Channel ID: Found in the “Channel settings” page in the console
    • Channel secret: Found in the “Channel settings” page in the console
    • Callback URL: https:// + “Heroku app name” + .herokuapp.com/auth
  4. Click the Deploy button. Heroku then deploys this repository to a new Heroku app on your account.
Configure your app in the console

Set the callback URL in the “App settings” page of the LINE Developers console.

Run the app in a browser

When you successfully log in with your LINE credentials, the app displays your LINE user profile image, display name, and status message. Note that you will be logged in automatically if you are logged in to the LINE app on your iOS or Android device.

  1. Go to the URL of your app to open up the LINE Login dialog. https:// + {Heroku app name} + .herokuapp.com
  2. Log in to LINE and agree to grant the required permissions to the app
Try out other features of the starter app

Once you have logged into the app, you can select the following buttons to try out other features of this app.

View logs

To get more information, you can check the logs of your app using [Heroku CLI][heroku-cli].

  1. Log in to Heroku from the command line

    roku login
    
  2. View the logs. For more information, see View logs.

    roku logs --app {Heroku app name} --tail
    
Download and make changes to the starter app

You can download the starter app to your local machine to test and make changes for yourself. You can then deploy the app to a web server of your choice. Here, we'll look at how to make and deploy changes to the Heroku app you created in the previous step.

  1. Make sure you have the following installed

    • JDK 1.8 or higher installed
    • Maven 3.0 or higher installed
    • Git
  2. Clone this GitHub repository.

    clone https://github.com/line/line-login-starter.git
    
  3. cd into your Git directory

  4. Add a remote for Heroku to your local repository

    roku git:remote -a {Heroku app name}
    
  5. Make edits and commit changes (optional)

    t add .
    t commit -m "First commit"
    
  6. Push changes to Heroku master

    t push heroku master
    
Other resources

For more information on how to integrate LINE Login with your existing web app, see Integrating LINE Login with your web app.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.