I found the solution 
My issue was that I needed to wrap the secret in a buffer. For those ever encountering this issue, make sure you use:
var secret = new Buffer('yoursecret', 'base64');
I found the solution 
My issue was that I needed to wrap the secret in a buffer. For those ever encountering this issue, make sure you use:
var secret = new Buffer('yoursecret', 'base64');