Skip to main content

Line

Sign in with LINE accounts using OAuth 2.0 with OpenID Connect. Popular in Japan, Taiwan, and Thailand.

1. Create OAuth App​

  1. Go to the LINE Developers Console.
  2. Log in with your LINE account.
  3. Create a new Provider (or select an existing one).
  4. Click Create a new channel > LINE Login.
  5. Fill in the required fields:
    • Channel name: Your app name
    • Channel description: Brief description
    • App types: Check Web app
  6. After creation, go to the LINE Login tab.
  7. Add your callback URL (see below).

2. Set Redirect URI​

Add your EdgeBase callback URL under the LINE Login tab > Callback URL:

https://your-edgebase-url/api/auth/oauth/line/callback

For local development:

http://localhost:8787/api/auth/oauth/line/callback

3. Get Credentials​

In your channel's Basic settings tab:

  • Client ID — Listed as Channel ID.
  • Client Secret — Listed as Channel secret.

4. Configure EdgeBase​

// edgebase.config.ts
export default defineConfig({
auth: {
allowedOAuthProviders: ['line'],
},
});
export default defineConfig({
auth: {
oauth: {
line: {
clientId: 'YOUR_CHANNEL_ID',
clientSecret: 'YOUR_CHANNEL_SECRET',
},
},
},
});

5. Usage​

client.auth.signInWithOAuth('line');

Provider Details​

PropertyValue
Scopesprofile openid email
PKCENo
EmailConditional — only from id_token, not profile API
Email verifiedNo — LINE does not provide verification status
AvatarYes — pictureUrl
Refresh tokenYes

Notes​

  • Email is extracted from the id_token JWT, not from the profile endpoint. The email may not be available if the user hasn't granted email permission.
  • EdgeBase sets emailVerified: false for LINE accounts, so automatic account linking will not occur.
  • The LINE user ID field is named userId (not id), which EdgeBase handles automatically.
  • To request email access, you must apply for email permission in the LINE Developers Console under your channel's OpenID Connect settings.
  • The channel must be Published (not in Development) for non-developer users to sign in.