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
.env
file ./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_challenge
fromcode_verifier
withcode_challenge_method
- send authorization request with
code_challenge
andcode_challenge_method
- token request with
code_verifier
then authorization server(not ourselves) verify code_verifier
.