[`@firebase-auth`] 501 Not Implement · Issue #1834 · honojs/middleware · GitHub
Skip to content

[@firebase-auth] 501 Not Implement #1834

Open

Description

@blackmouse572

Which middleware has the bug?

@hono/firebase

What version of the middleware?

^1.4.2

What version of Hono are you using?

^4.12.9

What runtime/platform is your app running on? (with version if possible)

Cloudflare worker

What steps can reproduce the bug?

  1. BACKEND SETUP
import { Hono } from 'hono'
import { cors } from 'hono/cors'
import { gallaryController } from './modules/gallery/gallery.controller'
import { verifyFirebaseAuth, VerifyFirebaseAuthEnv } from '@hono/firebase-auth'

type AppEnv = {
  Bindings: VerifyFirebaseAuthEnv
}
const app = new Hono<AppEnv>().basePath('/api')

app.use(
  '*',
  cors({
    origin: ['http://localhost:1420', 'tauri://localhost'],
    allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
    allowHeaders: ['Content-Type', 'Authorization'],
    credentials: true,
  }),
)
app.use(
  '*',
  verifyFirebaseAuth({
    projectId: 'dev-something',
  }),
)
app.route('/gallery', gallaryController)

export default app
  1. FRONTEND SETUP
import { auth } from '@/firebase'
import axios from 'axios'

export const backendInstance = axios.create({
  baseURL: import.meta.env.VITE_BACKEND_URL || 'http://localhost:8080/api',
})

backendInstance.interceptors.request.use(async (config) => {
  if (!auth.currentUser) {
    return config
  }
  const idToken = await auth.currentUser.getIdToken()
  config.headers['Authorization'] = `Bearer ${idToken}`
  return config
})

function signUploadUrl() {
  return backendInstance.get('/gallery')
}

export const galleryService = {
  signUploadUrl,
}

What is the expected behavior?

Expect to got 200 OK with json response

What do you see instead?

501 Not Implemented

Image

Additional information

I use wrangler dev --local for runing backend

Activity

  1. BarryThePenguin commented on Mar 29, 2026

    @BarryThePenguin
    Contributor

    My guess would be that wrangler doesn't implement some API that firebase expects. From my understanding, firebase won't run on Cloudflare Workers?

  2. blackmouse572 commented on Mar 29, 2026

    @blackmouse572
    Author

    My guess would be that wrangler doesn't implement some API that firebase expects. From my understanding, firebase won't run on Cloudflare Workers?

    This lib support Worker officially ? Is it not ? I do not use firebase admin sdk. Only this one

  3. BarryThePenguin commented on Mar 29, 2026

    @BarryThePenguin
    Contributor

    Ah.. I didn't realise that it uses https://github.com/Code-Hex/firebase-auth-cloudflare-workers

    It may be worth opening an issue there as @hono/firebase-auth is just a light wrapper around firebase-auth-cloudflare-workers

  4. yusukebe commented on Mar 30, 2026

    @yusukebe
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions