This repository is LINE-Login demo application.
This application gets Token from LINE Platform and just displays username and profile-picture url.
- make channel
- set callback URL
- set CLIENT_ID and CLIENT_SECRET to
.envfile ./gradlew bootRun
state is used to prevent CSRF. We should verify
that the state sent to the user is the same as the state received from the LINE Platform.
nonce is used to prevent replay attacks. We should verify that
the nonce sent to the user is the same as the nonce in IdToken received from the LINE Platform.
There's a chance of replay attacks when we use implicit flow(deprecated), or send to token from client to server, or etc.
code_verifier, code_challenge, and code_challenge_method are used to prevent code injection. We should do
the following:
- generate random as
code_verifier - generate
code_challengefromcode_verifierwithcode_challenge_method - send authorization request with
code_challengeandcode_challenge_method - token request with
code_verifier
then authorization server(not ourselves) verify code_verifier.