Giter Site home page Giter Site logo

line-login-go's Introduction

LINE loing in Go: Sample code for LINE login in Go

GoDocgoreportcard.com Go

Refer LINE Developer Document "Integrating LINE Login with your web app" for more detail.

This sample code implement how to integrate LINE login to your website in Go. You can use this sample code to integrate LINE login in your web application. Also this also provide link a chatbot service when user use LINE login. Refer "Linking a bot with your LINE Login channel".

Deploy on Heroku

Deploy

Before deploy this to your Heroku, you will need complete as follows:

  • Create a LINE login channel. Remember it's channel ID and channel secret.
  • Crete a LINE Message API channel. Remember it's channel secret and token.
  • Link the chatbot to the LINE login channel

Run In Docker

docker build -t line-login-go:latest .

docker run \
-e LINECORP_PLATFORM_CHATBOT_CHANNELSECRET=your_secret \
-e LINECORP_PLATFORM_CHATBOT_CHANNELTOKEN=your_token \
-e LINECORP_PLATFORM_SERVERURL=http://localhost:8080 \
-e LINECORP_PLATFORM_CHANNEL_CHANNELID=your_channel_id \
-e LINECORP_PLATFORM_CHANNEL_CHANNELSECRET=your_channel_secret \
-e PORT=8080 \
-p 8080:8080 \
line-login-go

License

MIT License

line-login-go's People

Contributors

kkdai avatar memwey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

line-login-go's Issues

DecodePayload(channelID string) 問題

呼叫這個函數時,回傳的中文字會變成亂碼,後來發現是:
bPayload, err := b64.StdEncoding.DecodeString(payload) 產生的問題,

改為:
bPayload, err := b64.RawURLEncoding.DecodeString(payload)

之後就正常了,供您參考。

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.