Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Line

Line Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_LINE_ID
AUTH_LINE_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import Line from "next-auth/providers/line"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [Line],
})

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 your callback URL as defined above.

Notes

  • 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.
Auth.js © Balázs Orbán and Team - 2024