Line
Sign in with LINE accounts using OAuth 2.0 with OpenID Connect. Popular in Japan, Taiwan, and Thailand.
1. Create OAuth App
- Go to the LINE Developers Console.
- Log in with your LINE account.
- Create a new Provider (or select an existing one).
- Click Create a new channel > LINE Login.
- Fill in the required fields:
- Channel name: Your app name
- Channel description: Brief description
- App types: Check Web app
- After creation, go to the LINE Login tab.
- 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
- JavaScript
- Dart/Flutter
- Swift
- Kotlin
- Java
- C#
- C++
client.auth.signInWithOAuth('line');
await client.auth.signInWithOAuth('line');
let url = client.auth.signInWithOAuth(provider: "line")
// Open url in SFSafariViewController or ASWebAuthenticationSession
client.auth.signInWithOAuth("line")
client.auth().signInWithOAuth("line");
client.Auth.SignInWithOAuth("line");
OAuth requires a browser redirect flow. For C++ (Unreal Engine), handle OAuth in a platform webview and pass the token to the SDK.
Provider Details
| Property | Value |
|---|---|
| Scopes | profile openid email |
| PKCE | No |
Conditional — only from id_token, not profile API | |
| Email verified | No — LINE does not provide verification status |
| Avatar | Yes — pictureUrl |
| Refresh token | Yes |
Notes
- Email is extracted from the
id_tokenJWT, not from the profile endpoint. The email may not be available if the user hasn't granted email permission. - EdgeBase sets
emailVerified: falsefor LINE accounts, so automatic account linking will not occur. - The LINE user ID field is named
userId(notid), 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.