<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp" -->

---
title: Authenticate your Firebase users with LINE Login | daily.dev
description: A step-by-step guide shows how to integrate LINE Login, a popular federated login provider in Japan and other Asian countries, with Firebase Authentication on...
canonical: https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Authenticate your Firebase users with LINE Login | daily.dev
og:description: A step-by-step guide shows how to integrate LINE Login, a popular federated login provider in Japan and other Asian countries, with Firebase Authentication on...
og:url: https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp
og:image: https://api.daily.dev/og/posts/HSxAaxnxp.png
og:image:alt: Authenticate your Firebase users with LINE Login
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate your Firebase users with LINE Login

**[Firebase](https://daily.dev/sources/firebase-blog)** · 5 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide shows how to integrate LINE Login, a popular federated login provider in Japan and other Asian countries, with Firebase Authentication on iOS and Android using Custom Auth. The flow involves using the LINE SDK to obtain an access token, sending it to a backend server for validation against LINE's Social REST API (checking the channelId to prevent spoofing), generating a Firebase Custom Auth token, and signing the user into Firebase with that token. Sample code and a Node.js server implementation are provided, along with a link to open-source sample code on GitHub.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2016/11/authenticate-your-firebase-users-with-line-login>

## Questions this post answers

### How do I authenticate a user with LINE Login and Firebase Authentication on Android or iOS?

Use the LINE Login SDK to sign the user in and obtain a LINE access token, send that token to your own server to validate against LINE's Social REST API, verify the channelId to prevent spoofing, then generate a Firebase Custom Auth token on the server and use it to call signInWithCustomToken on the device. LINE's user ID can be reused as the Firebase UID, prefixed like 'line:' plus the mid.

_daily.dev surfaces integration guides like this for developers wiring up custom auth providers with Firebase._

### Why do I need to check the channelId when validating a LINE access token on my server?

Checking the channelId prevents a spoof attack where an attacker reuses an access token issued for a different app or channel to log into your app. After sending the token to LINE's verify endpoint (https://api.line.me/v1/oauth/verify), the response's channelId must match your own LINE channel ID before you trust the token and issue a Firebase custom token.

_developers hardening custom auth flows can track security-relevant patterns like this on daily.dev._

## Similar posts on daily.dev

- [Kotlin / Wasm — Auth part 1: Google Sign in](https://daily.dev/posts/kotlin-wasm-auth-part-1-google-sign-in-dp1b4k1zm) · ProAndroidDev · 0 upvotes · 0 comments
- [How to Create Role-Based Access Control \(RBAC\) with Custom Claims Using Firebase Rules](https://daily.dev/posts/how-to-create-role-based-access-control-rbac-with-custom-claims-using-firebase-rules-mfr8m0dds) · freeCodeCamp · 2 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#ios](https://daily.dev/tags/ios), [#authentication](https://daily.dev/tags/authentication), [#firebase](https://daily.dev/tags/firebase), [#oauth](https://daily.dev/tags/oauth)

[View this post on daily.dev](https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Authenticate your Firebase users with LINE Login","url":"https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp"},"datePublished":"2026-08-23T12:21:18.540Z","dateModified":"2026-08-23T12:37:53.159Z","description":"A step-by-step guide shows how to integrate LINE Login, a popular federated login provider in Japan and other Asian countries, with Firebase Authentication on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,ios,authentication,firebase,oauth","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Authenticate your Firebase users with LINE Login"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/authenticate-your-firebase-users-with-line-login-hsxaaxnxp#faq","mainEntity":[{"@type":"Question","name":"How do I authenticate a user with LINE Login and Firebase Authentication on Android or iOS?","acceptedAnswer":{"@type":"Answer","text":"Use the LINE Login SDK to sign the user in and obtain a LINE access token, send that token to your own server to validate against LINE's Social REST API, verify the channelId to prevent spoofing, then generate a Firebase Custom Auth token on the server and use it to call signInWithCustomToken on the device. LINE's user ID can be reused as the Firebase UID, prefixed like 'line:' plus the mid. daily.dev surfaces integration guides like this for developers wiring up custom auth providers with Firebase."}},{"@type":"Question","name":"Why do I need to check the channelId when validating a LINE access token on my server?","acceptedAnswer":{"@type":"Answer","text":"Checking the channelId prevents a spoof attack where an attacker reuses an access token issued for a different app or channel to log into your app. After sending the token to LINE's verify endpoint (https://api.line.me/v1/oauth/verify), the response's channelId must match your own LINE channel ID before you trust the token and issue a Firebase custom token. developers hardening custom auth flows can track security-relevant patterns like this on daily.dev."}}]}
```

