# Connect Node.js to Multiple SAML IdP

**URL:** <https://community.auth0.com/t/connect-node-js-to-multiple-saml-idp/86528>\
**Category:** Get Help\
**Tags:** nodejs, saml\
**Created:** [July 6, 2022, 1:14pm UTC](https://community.auth0.com/t/connect-node-js-to-multiple-saml-idp/86528 "2022-07-06T13:14:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ansnoussi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ansnoussi/32/38600_2.png) [@ansnoussi](https://community.auth0.com/u/ansnoussi)\
**Post date:** [July 6, 2022, 1:14pm UTC](https://community.auth0.com/t/connect-node-js-to-multiple-saml-idp/86528/1 "2022-07-06T13:14:07Z")

</div>

Hi Everyone,

I have a simple MERN app that currently doesn’t use Auth0, but instead I’m using a basic jwt authentication.  
I want to make it possible for users to use SSO with an IdP that they specify.  
(make it possible for users to list my app as an SP).

I see that this is possible with Auth0, but I’m completely lost on how ( or if possible ) to do this in a MERN stack setup.

Any hints/example in this regard would be extremely helpful !

Thank you 🙏 !

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 20, 2024, 11:52am UTC](https://community.auth0.com/t/connect-node-js-to-multiple-saml-idp/86528/3 "2024-05-20T11:52:41Z")

</div>

Hi there, for any future members looking at this topic - to enable multiple SAML IdPs (enterprise connections) to a client application, we recommend using Home Realm Discovery to map the user’s entered email domain to a particular IdP.

To make it work with Auth0-hosted New Universal Login, please take a look here: [Configure Identifier First Authentication](https://auth0.com/docs/authenticate/login/auth0-universal-login/identifier-first#define-home-realm-discovery-identity-providers).

For integrating Auth0 with the MERN stack, we recommend following respective quick starts - [Auth0](https://auth0.com/docs/quickstarts).

If the Home Real Discovery does not work for you (you can’t map user email with the IdP domain), we recommend using the Organizations feature so that an IdP/IdPs can be assigned on an Organization level. Take a look here: [Single Identity Provider Organizations](https://auth0.com/docs/get-started/architecture-scenarios/multiple-organization-architecture/single-identity-provider-organizations) and [Multiple Identity Provider Organizations](https://auth0.com/docs/get-started/architecture-scenarios/multiple-organization-architecture/multiple-idp-orgs).

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 20, 2024, 11:52am UTC](https://community.auth0.com/t/connect-node-js-to-multiple-saml-idp/86528/4 "2024-05-20T11:52:51Z")

</div>


