Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@honojs/firebase-auth

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@honojs/firebase-auth - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

3

dist/index.d.ts

@@ -14,4 +14,5 @@ /// <reference types="@cloudflare/workers-types" />

disableErrorLog?: boolean;
firebaseEmulatorHost?: string;
}
export declare const verifyFirebaseAuth: (userConfig: VerifyFirebaseAuthConfig) => Handler<string, VerifyFirebaseAuthEnv>;
export declare const verifyFirebaseAuth: (userConfig: VerifyFirebaseAuthConfig) => Handler;
export declare const getFirebaseToken: (c: Context) => FirebaseIdToken | null;

@@ -16,2 +16,3 @@ "use strict";

disableErrorLog: userConfig.disableErrorLog,
firebaseEmulatorHost: userConfig.firebaseEmulatorHost,
};

@@ -28,3 +29,5 @@ return async (c, next) => {

try {
const idToken = await auth.verifyIdToken(jwt, c.env);
const idToken = await auth.verifyIdToken(jwt, {
FIREBASE_AUTH_EMULATOR_HOST: config.firebaseEmulatorHost ?? c.env.FIREBASE_AUTH_EMULATOR_HOST,
});
setFirebaseToken(c, idToken);

@@ -31,0 +34,0 @@ }

{
"name": "@honojs/firebase-auth",
"version": "1.0.1",
"version": "1.0.2",
"description": "A third-party firebase auth middleware for Hono",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# Hono Firebase Auth middleware for Cloudflare Workers.
## Moving
Firebase Auth Middleware `@honojs/firebase-auth` is renamed to `@hono/firebase-auth`.
`@honojs/firebase-auth` is not maintained, please use `@hono/firebase-auth`.
Also, for Deno, you can use import with `npm:` prefix like `npm:@hono/firebase-auth`.
---
This is a Firebase Auth middleware library for [Hono](https://github.com/honojs/hono) which is used [firebase-auth-cloudflare-workers](https://github.com/Code-Hex/firebase-auth-cloudflare-workers).

@@ -13,3 +21,3 @@

import { Hono } from "hono";
import { VerifyFirebaseAuthConfig, VerifyFirebaseAuthEnv, verifyFirebaseAuth, getFirebaseToken } from "@honojs/firebase-auth";
import { VerifyFirebaseAuthConfig, VerifyFirebaseAuthEnv, verifyFirebaseAuth, getFirebaseToken } from "@hono/firebase-auth";

@@ -38,3 +46,3 @@ const config: VerifyFirebaseAuthConfig = {

import { Hono } from "hono";
import { VerifyFirebaseAuthConfig, verifyFirebaseAuth, getFirebaseToken } from "@honojs/firebase-auth";
import { VerifyFirebaseAuthConfig, verifyFirebaseAuth, getFirebaseToken } from "@hono/firebase-auth";

@@ -41,0 +49,0 @@ const config: VerifyFirebaseAuthConfig = {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc