# gladly-team/next-firebase-auth

Simple Firebase authentication for all Next.js rendering strategies

Repository: https://github.com/gladly-team/next-firebase-auth
Canonical: https://ross.abutalabs.com/products/next-firebase-auth
Homepage: https://nfa-example-git-v1x-gladly-team.vercel.app/
Language: TypeScript
License: MIT
License Family: permissive
Topics: next, nextjs, firebase, firebase-js-sdk, firebase-authentication, cookies
Last push: 2024-12-27T16:58:21+00:00

## Health v2 (maintenance only)
Score: 30/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 28, longevity 100
- inputs: {"age_days": 2162, "days_push": 614, "days_rel": 614, "gap_med": 31.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1374, forks 284 (observed 2026-08-28T04:04:33.027331+00:00)

## What it is
A TypeScript library that simplifies Firebase authentication in Next.js apps across all rendering strategies (SSR, static, client-side). It manages signed HTTP-only cookies holding the Firebase user info and ID token, refreshing tokens as needed.

## Use cases
- add firebase authentication to a next.js app
- access the firebase user during server-side rendering
- store firebase id tokens in secure http-only cookies
- redirect users based on auth status in next.js pages
- authenticate api requests with firebase id tokens server-side
- support both static and ssr pages with the same auth logic

## When to choose
- your Next.js app mixes static and server-rendered pages and needs the Firebase user on the server
- you need the Firebase ID token server-side to call APIs
- you want cookie-based auth handling with token refresh out of the box

## When to avoid
- your app is fully static and only needs the user client-side — use the Firebase JS SDK directly
- you use a backend framework other than Next.js
- you need session management decoupled from Firebase's auth model

## Facets
- artifact type: library
- maturity: active
- function: auth, middleware, http-server
- domain: web-development, frontend, backend, security
- platform: cross-platform
- tags: nextjs, firebase, firebase-auth, ssr, cookies, typescript, react, nodejs, web-server

## Member repositories
- gladly-team/next-firebase-auth (main) score 30

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:33.027331+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:37.421818+00:00, confidence not recorded.
  - readme: https://github.com/gladly-team/next-firebase-auth (fetched 2026-08-28T04:04:33.027331+00:00, sha 8c95330b2880)
  - homepage: https://nfa-example-git-v1x-gladly-team.vercel.app/ (fetched 2026-08-29T11:57:18.254356+00:00, sha f3dd1e462d7e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
