This is a Node.js Express Regular Web application that uses the SAML2 protocol to authentication against Auth0 as SAML IDP
Optional, dev. setup.
Add:
127.0.0.1 app1.com
to your /etc/hosts
file.
Create a regular web application Client.
Under settings ensure you have:
Client-Type: Regular Web Application
Allowed Callback URLs:
Allowed Logout URLs
Under tenant settings -> advanced -> Allowed Logout URLs
Under Application -> Addons -> SAML2 Web App
We shall be following these Auth0 documentation instructions
Enable the SAML2 Web App toggle
Optionally, add any specific settings you like in Settings
textarea.
For example:
{
"nameIdentifierProbes": [
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
]
}
Install the dependencies.
npm install
Need to update config.js
Example populated values below:
auth0Domain: process.env.AUTH0_DOMAIN || 'demonstration.auth0.com',
path: process.env.SAML_PATH || '/callback',
entryPoint: process.env.SAML_ENTRY_POINT || 'https://demonstration.auth0.com/samlp/EGkmJ0gloLyPgzbZc2ivqDkac8RkJfAE',
issuer: 'urn:demonstration.auth0.com',
cert: process.env.SAML_CERT || `-----BEGIN CERTIFICATE----- ...
auth0Domain
- the Domain
setting under {Your Application} -> Settings
path
- you can leave this as /callback
for this app. It is the callback path
entryPoint
- Get this value from {Your Application} -> Addons -> SAM2 Web App -> Usage (tab)
It is the Identity Provider Login URL
value.
issuer
- Get this value from {Your Application} -> Addons -> SAM2 Web App -> Usage (tab)
It is the Issuer
value.
cert
- Get this value from {Your Application} -> Addons -> SAM2 Web App -> Usage (tab)
Click on Identity Provider Certificate: download Auth0 certificate
and it is the downloaded cert contents.
Run the application by executing the command below.
npm start
The app will be served at http://app1.com:3000
.
Auth0 helps you to:
- Add authentication with multiple authentication sources, either social like Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others, or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider.
- Add authentication through more traditional username/password databases.
- Add support for linking different user accounts with the same user.
- Support for generating signed Json Web Tokens to call your APIs and flow the user identity securely.
- Analytics of how, when and where users are logging in.
- Pull data from other sources and add it to the user profile, through JavaScript rules.
- Go to Auth0 and click Sign Up.
- Use Google, GitHub or Microsoft Account to login.
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.