Yup, that's right - I want it shorter. All the search results out there are asking how to make it longer, but I need to test our custom token handling when the expiration triggers. Thus, 1 hour is way too long; is there an easy way to shorten it to a minute or less?
Our node.js code looks something like this:
firebase.auth()
.signInWithEmailAndPassword(email, password)
.then(function(validUser) {
validUser.getToken(true)
.then(function(customToken) {
// Send token back to client
res.writeHead(200,
{'Content-Type': 'application/json'}
);
res.end(...);
Given a valid email & password, validUser.getToken(true) returns a valid JWT; however, its expiration is 1 hour. Does getToken take an options literal that lets me modify the expiration?