@honojs/firebase-auth
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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 = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8685
73
120
1