Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/presswink/firebase-jwt
this package is going to verify firebase access-token without using firebase admin sdk.
https://github.com/presswink/firebase-jwt
express expressjs firebase firebase-admin firebase-admin-sdk firebase-auth firebase-authentication jwt jwt-auth jwt-authentication jwt-middleware jwt-tokens middleware next-auth nextjs nextjs14
Last synced: 5 days ago
JSON representation
this package is going to verify firebase access-token without using firebase admin sdk.
- Host: GitHub
- URL: https://github.com/presswink/firebase-jwt
- Owner: presswink
- License: mit
- Created: 2024-08-23T01:46:08.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-31T02:52:28.000Z (3 months ago)
- Last Synced: 2024-10-30T20:20:57.572Z (19 days ago)
- Topics: express, expressjs, firebase, firebase-admin, firebase-admin-sdk, firebase-auth, firebase-authentication, jwt, jwt-auth, jwt-authentication, jwt-middleware, jwt-tokens, middleware, next-auth, nextjs, nextjs14
- Language: TypeScript
- Homepage:
- Size: 434 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# @presswink/firebase-jwt
this package is going to verify firebase access-token without using firebase admin sdk.## Getting Start
1) install the package
`NPM`
```cmd
npm i @presswink/firebase-jwt
````yarn`
```cmd
yarn add @presswink/firebase-jwt
```2) Examples
`typescript` or `es6`
```ts
import FirebaseJwt from '@presswink/firebase-jwt'const projectId: string = "firebase-auth"
const jwtToken: string = ""const jwt = new FirebaseJwt(projectId)
// verify jwt tokens
const verifyResult = jwt.verify(jwtToken)
console.log(verifyResult)// decode jwt tokens
const decodeResult = jwt.decode(jwtToken)
console.log(decodeResult)```
`commonjs`
```js
const FirebaseJwt = require('@presswink/firebase-jwt')const projectId = "firebase-auth"
const jwtToken = ""const jwt = new FirebaseJwt(projectId)
// verify jwt tokens
const verifyResult = jwt.verify(jwtToken)
console.log(verifyResult)// decode jwt tokens
const decodeResult = jwt.decode(jwtToken)
console.log(decodeResult)```
`next.js`
```js
'use server'const {NextFirebaseJwt} = require('@presswink/firebase-jwt')
const projectId = "firebase-auth"
const jwtToken = ""const jwt = new NextFirebaseJwt(projectId)
// verify jwt tokens
const verifyResult = jwt.verify(jwtToken)
console.log(verifyResult)// decode jwt tokens
const decodeResult = jwt.decode(jwtToken)
console.log(decodeResult)```
# Development Guide
1) clone the repository
```cmd
git clone https://github.com/presswink/firebase-jwt.git
```2) node version should be >= `v22.4.0`
3) install packages
`NPM`
```cmd
npm i
````yarn`
```cmd
yarn install
```5) build project
`NPM`
```cmd
npm run build
````yarn`
```cmd
yarn build
```4) run the test cases
`NPM`
```cmd
npm run test
````yarn`
```cmd
yarn test
```# Docs
### [changelog.md](changelog.md)
# Contributor
[@Aditya panther](https://github.com/Adityapanther)