Because of this commit 8920013 some of our certificates which contained spaces caused the error TypeError: keyInfo is not in PEM format or in base64 format, while it was working fine in previous version.
As this breaking change was not explicitly stated in the changelog, I figured out that I'd log this bug in case someone else searches for it. The solution is to clean up the base64 of idpCert before passing it to node-saml (so no spaces, correct "=" padding, etc) - I don't know if node-saml should defensively perform the clean up too, up to you (let me know if you'd like a PR for this, happy to do it).