Our Gadget app had been working fine for about a year, then we started getting errors on our generated tokens. We have a SECRET_KEY set in our env vars within Gadget.
Within api/routes/POST-generate-token.js we have:
const token = crypto
.createHmac('sha256', process.env.SECRET_KEY)
.update(request.body.email)
.digest('hex');
But it refused to generate the correct token. I output the SECRET_KEY to the console, and it appears to be: value-needed-to-boot-app-1111111
Which isn't even close to what is listed within Development or Production vars.
Why would this happen? And how can I make it actually use SECRET_KEY?