google/google-api-nodejs-client — pull request #248 by kumikoda (2014-08-07 02:27:23+00:00)
Title: added try catch around verifySignedJwtWithCerts in verifyIdToken

verifyIdToken is not throw safe because verifySignedJwtWithCerts throws.

but we can't simply wrap the verifyIdToken call in try catch because the call to verifySignedJwtWithCerts is async.

also returning the error seems more helpful than just a generic error string.