diff --git a/src/passport-saml/saml.ts b/src/passport-saml/saml.ts index 2c6c075f..923fcdd6 100644 --- a/src/passport-saml/saml.ts +++ b/src/passport-saml/saml.ts @@ -1422,7 +1422,7 @@ class SAML { keyToPEM(key: crypto.KeyLike) { if (!key || typeof key !== 'string') return key; - const lines = key.split('\n'); + const lines = key.split(/\r?\n/); if (lines.length !== 1) return key; const wrappedKey = [