feat(examples): add Enterprise Connect example for auth0-express - #51
Open
Piyush-85 wants to merge 4 commits into
Open
feat(examples): add Enterprise Connect example for auth0-express#51Piyush-85 wants to merge 4 commits into
Piyush-85 wants to merge 4 commits into
Conversation
Adds example-express-enterprise-connect demonstrating EC mode: the enterpriseConnect flag + onCallback with an app-owned signed-cookie session, startEnterpriseLogin for email-based Home Realm Discovery login, and federated logout. The README also documents composing the standalone isFederatedDomain check with a /auth/login redirect as an alternative to startEnterpriseLogin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a runnable example,
examples/example-express-enterprise-connect, demonstrating Enterprise Connect (EC) with theauth0-expressSDK.In EC mode Auth0 acts as a pure SSO relay, it writes no Auth0 session, and the application owns its own session. The example shows the full end-to-end flow across the EC surface: the
enterpriseConnectflag,startEnterpriseLogin(email-based Home Realm Discovery login), the requiredonCallbackhook (app-owned session), and federated logout. It also documents an alternative that composes the standaloneisFederatedDomaincheck with a/auth/loginredirect.Setup, configuration, the full flow, and route list are covered in the example's README — not repeated here.
No SDK source is changed in this PR and there are no public API changes; it only adds an example.
References
Testing
This is an example app; consistent with the other packages under
examples/, it has no unit/integration tests. Verified manually end-to-end (federated login, non-federated rejection, protected route, federated logout). Reproduction steps and tenant prerequisites are in the README.Environment: Node.js / TypeScript, Express 5, macOS.
Checklist