Skip to content

poornaonline/FirebaseJWTValidationMiddleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Firebase JWT token validator middleware

This middleware can be used in Node.js environment to validate the requests coming from the client. Current version written in Typescript.

serviceAccountKey.json // "Replace this file's content with your firebase access keys"

How to use the middleware:

app.get("/user", validateFirebaseToken, (req: Request, res: Response) => {
    res.send({
        FirstName : "Poorna",
        LastName : "Jayasinghe"
    });
});