Actively maintained
A simple, well-documented API backed by an active community and regular releases.
Node.js library for Single Sign-On with SAML 2.0

Install the stable release via npm:
npm install samlifyOr via yarn:
yarn add samlifyA minimal identity provider implementation is included for testing and educational purposes. Integration with third-party identity providers is also supported.
Breaking changes since v2
File attributes such as metadata and keyFile must now be passed as strings (or buffers). This enables integration with database storage, in-memory sources, and the local filesystem through a single interface.
The entity constructor now accepts a single configuration object rather than separate metadata and configuration arguments.
const saml = require('samlify');
// Configure a service provider.
const sp = saml.ServiceProvider({
metadata: fs.readFileSync('./metadata_sp.xml')
});
// Configure the corresponding identity provider.
const idp = saml.IdentityProvider({
metadata: fs.readFileSync('./metadata_idp.xml')
});
// Parse an inbound SAML Response sent by the IdP.
router.post('/acs', (req, res) => {
sp.parseLoginResponse(idp, 'post', req)
.then(parseResult => {
// Apply your own validation and rendering logic here.
})
.catch(console.error);
});By default, the library verifies the XML signature and the issuer name of the identity provider. The code base is self-documenting; additional use cases are covered throughout this documentation.
MIT