GithubHelp home page GithubHelp logo

kosukekamiya / line-login-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from line/line-login-starter

0.0 1.0 0.0 59 KB

LINE WEB Login

Home Page: https://developers.line.me/web-api/overview

License: Apache License 2.0

Java 74.31% CSS 1.64% JavaScript 3.06% HTML 20.99%

line-login-starter's Introduction

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

  • A LINE Login channel with the "WEB" app type. To create a channel, go to Creating a Channel on the LINE Developers site.
  • A Heroku account (free to create)

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.

  • Verify the user access token
  • Refresh the user access token
  • Log out the user (revoke the access token)

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

    $ heroku login
  2. View the logs. For more information, see View logs.

    $ heroku 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.

    git 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

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

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

    $ git 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.

line-login-starter's People

Contributors

cosmic-cowboy avatar kosukekamiya avatar guitarsucks avatar mrexmelle avatar youhei avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.