Skip to content

feat(examples): add Enterprise Connect example for auth0-express - #51

Open
Piyush-85 wants to merge 4 commits into
mainfrom
feat/enterprise-connect-example
Open

feat(examples): add Enterprise Connect example for auth0-express#51
Piyush-85 wants to merge 4 commits into
mainfrom
feat/enterprise-connect-example

Conversation

@Piyush-85

Copy link
Copy Markdown

Description

Adds a runnable example, examples/example-express-enterprise-connect, demonstrating Enterprise Connect (EC) with the auth0-express SDK.

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 enterpriseConnect flag, startEnterpriseLogin (email-based Home Realm Discovery login), the required onCallback hook (app-owned session), and federated logout. It also documents an alternative that composes the standalone isFederatedDomain check with a /auth/login redirect.

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

  • Depends on the Enterprise Connect SDK PR:

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.

  • This change adds test coverage for new/changed/fixed functionality — N/A (example app; no test suite, matching sibling examples)

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs — README included
  • All active GitHub checks for tests, formatting, and security are passing

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant