Closed sbeatz closed 6 years ago
Are you using express.js to host the skill? If so, the middleware for parsing it was recently updated and that could be the problem. @mreinstein Has there been any breaking changes to your alexa-verifier that should be addressed?
using both old and new(1.0.0) - old on live and new on dev - both return 401 when the verifier fails can change that easily myself, but was just curious if anyone else is facing that kind of issues with amazon
just in case Amazon is really that picky about an error code it should be imho
verifier(certUrl, signature, req.rawBody, function(er) { if (er) { res.status(400).json({ status: 'failure', reason: er }) } else { next() } })
in the index.js of alexa-verifier-middleware
just for the record - here is the crap Amazon sent me (and their docs only state to use 400 for invalid timestamps - otherwise they only say reject the request)
Issue: The skill end-point is not validating the signatures for incoming requests and is accepting requests with an incorrect certificate URL. Please make sure that your signature validation is correct. To reject an invalid request with an invalid signature or certificate, the skill should respond with HTTP status code 400 (Bad Request) in the response. Please refer to our documentation on how to build your Alexa Skill as a web service and validate requests and signatures.
Try changing it to 400, and submit it for certification again. If it succeeds, that means it's the middleware's fault. Otherwise there maybe be something else wrong with your setup.
feedback after recertification: changed it to 400 and got certified again
@sbeatz Just released a patch (v1.0.1) which now returns a 400 on any error.
my skill got removed from the alexa skill store cause the cert verification is not working properly
now i checked the verification manually and the only difference i found compared to the Amazon Docs is that the verifier returns 401 instead of 400... still waiting for a response from Amazon - but did anyone else have this issue already?