PASSPORT JWT FIREBASE
This Library helps you use JWT Strategy with Passport and Firebase Auth
Usage of this Library is very simple
Functions
async TokenLoader.Load(timeout = 2 hours in MS)
Used to Load Google Auth tokens
Updates Token List every 2 hours by default
If Tokens don't match during checking, tokens get updated again
Not mandatory to call this method although first time check may fail if not called
FirebaseStrategy
Main Strategy used. Link it with passport using passport.use(new FirebaseStrategy());
constructor(options: JWTStrategyOptions, verfiedCallback)
Both Parameters are Optional
Pass JWT Strategy Options as the First param and pass callback function about what to do when verfied
EXAMPLES
;;;; TokenLoader.Load; // Note is Async;app.usebodyParser.json;app.usebodyParser.urlencoded; passport.usenew FirebaseStrategy;app.usepassport.initialize;app.usepassport.authenticate"jwt", ; app.use "/", passport.authenticate"jwt", ,; ;app.listenPort,;