Provider – Line

Line Sample

Table of contents

How to enable Line login in WordPress

1. Create a Line App

To be able to log in via Line you must create a Line app first.

  1. Navigate to https://developers.line.biz/console/
  2. Log in with your Line business account if you are not logged in.
  3. Click the “Create a new provider” button.
  4. Fill the “Provider name” field and click the “Create” button.
  5. Under the “Channels” panel select the “Create a LINE Login channel” option.
  6. Make sure “LINE Login” is selected as “Channel type”.
  7. For “Provider” choose the provider from the list, that you just created.
  8. Select your “Region”.
  9. Add your “Channel icon”, “Channel name” and “Channel description”. These will appear on your Consent Screen!
  10. At the “App types” select the “Web app” option.
  11. Read and consent to the “LINE Developers Agreement”, then click the “Create” button.
  12. Scroll down to “OpenID Connect”, click the “Apply” button near the “Email address permission” label.
  13. Fill out the form, then click the “Submit” button.
  14. Scroll up to the top of the page and choose the “LINE Login” section.
  15. Into the “Callback URL” field, add the URL that Nextend Social Login suggests in the backend.
  16. Under your App name click the “Developing” button and publish your Channel!
  17. Go to the “Basic settings” tab and find the necessary “Channel ID” and “Channel secret” values and fill these fields in the plugin settings!

2. App setup

Once your Line app is ready you’ll need to copy and paste the Channel ID and Channel secret to the Line provider’s Settings tab. You can find the information at your Line app’s Basic settings tab.

3. Verifying

Once your Channel ID and Channel Secret has been added you need to verify the setup first. This verification helps you identify possible problems with the app.

Settings

Line Provider Configuration

Channel ID

The Channel ID of your Line app. You can find it at your App under the Basic settings tab.

Channel Secret

The Channel Secret of your Line app. You can find it at your App under the Basic settings tab.

Force reauthorization on each login

When this setting is enabled, people will receive the Consent screen on each login.
-Available since: 3.1.2

Add LINE Official Account as a friend

  • Don’t display: The consent screen won’t offer your LINE Official account as a friend, even if you have a LINE Official Account selected in your Line App.
  • Display the add friend option in the consent screen: The OAuth consent screen will display your LINE Official Account on the same screen where the person authorizes the App. To make this feature work, you need to have a LINE Official Account selected in the Linked OA field of your App.
  • Opens a new screen with the add friend option after the consent screen: Once the user authorized your App in the OAuth consent screen, the person will be redirected to a dedicated page where your LINE Official Account will be offered as friend. To make this feature work, you need to have a LINE Official Account selected in the Linked OA field of your App.

-Available since: 3.1.2

Line other settings

Username prefix on Register

Whenever a new user registers with their Line account they can get a custom prefix so you can easily identify them.

Fallback username prefix on register

Whenever a new user registers with their Line account and we can not generate a valid username from the first name or last name, a random username will be generated. With this option they can get a custom prefix so you can easily identify them.

Terms and conditions

This option can only be seen, if Terms and conditions is set to Show in Global Settings → Privacy tab. Here you can set custom Terms and Conditions for users who register with Line. For more information please read our GDPR documentation.

Frequently Asked Questions

How can people add my LINE Official Account as a friend?

When your visitors connect to your site with the Line provider of Nextend Social Login, you can display your LINE Official Account in the consent screen or after the consent screen, so they could add it as a friend.
If you don’t have a LINE Official Account yet, then you could create one the following way:

  1. Visit to the Line Developer Console.
  2. Under the Providers section you should select the App that you configured Nextend Social Login with.
  3. Click the “Create a new channel” option.
  4. A modal will appear where you should select the “Messaging API”.
  5. Upload a Channel icon, then enter a Channel name, Channel Description, select a Category and Subcategory, enter a Privacy policy URL and a Terms of use URL.
  6. Read the terms of use and then check the two checkboxes
  7. Press the Create button.
  8. A modal will be opened, read its contents carefully and press the OK button.
  9. Once it is done, click the name of your App and select the “LINE Login” channel that you created for Nextend Social Login.
  10. On the “Basic settings” tab of the channel you will find the “Linked OA” option. Click the “Edit” button, and select the name of the LINE Official Account from the list, that you just created with the Messaging API.
  11. Press Update.
  12. Open the backend of Nextend Social Login and on the Settings tab of the Line provider you should chose the option for Add LINE Official Account as a friend that your prefer.
  13. Press the Save Changes button.

If you already have a LINE Official Account, then you just need to select it in your “LINE Login” channel as Linked OA, and then you can use the “Add LINE Official Account as a friend” setting of Nextend Social Login as it is mentioned above.

Common error messages returned by Line during verification

client_id is incorrect

Invalid client_id. You can use a Channel ID found in a LINE developers site as client_id.

The Channel ID you copied from the Line app is invalid. Make sure the correct one was copied.

client_secret is incorrect

Error: invalid_client: invalid client_secret

The Channel secret you copied from the Line app is invalid. Make sure the correct one was copied.

redirect_uri is incorrect

Invalid redirect_uri value. Check if it is registered in a LINE developers site.

The problem is that the entered Callback Url field is not correct for your app. Check the Callback Url value that you entered into your Line App on the LINE Login tab, and make sure you have the value added that we suggest in the Getting Started section!