Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
API reference
line

providers/line

Built-in LINE integration.

LineProfile

Extends

  • Record<string, any>

Properties

amr

amr: string[];

aud

aud: string;

exp

exp: number;

iat

iat: number;

iss

iss: string;

name

name: string;

picture

picture: string;

sub

sub: string;

user

user: any;

default()

default<P>(options): OAuthConfig<P>

Add LINE login to your page.

Setup

Callback URL

https://example.com/api/auth/callback/line

Configuration

import { Auth } from "@auth/core"
import LINE from "@auth/core/providers/line"
 
const request = new Request(origin)
const response = await Auth(request, {
  providers: [
    LINE({ clientId: LINE_CLIENT_ID, clientSecret: LINE_CLIENT_SECRET }),
  ],
})

Resources

Configuration

Create a provider and a LINE login channel at https://developers.line.biz/console/. In the settings of the channel under LINE Login, activate web app and configure the following: Callback URL http://localhost:3000/api/auth/callback/line

Notes

By default, Auth.js assumes that the LINE provider is based on the Open ID Connect specification.

💡

To retrieve email address, you need to apply for Email address permission. Open Line Developer Console, go to your Login Channel. Scroll down bottom to find OpenID Connect -> Email address permission. Click Apply and follow the instruction.

💡

The LINE provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.

Disclaimer If you think you found a bug in the default configuration, you can open an issue.

Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.

Type parameters

Type parameter
P extends LineProfile

Parameters

ParameterType
optionsOAuthUserConfig<P>

Returns

OAuthConfig<P>

Auth.js © Balázs Orbán and Team - 2024