[PR #8769] [CLOSED] fix(sso): use namespace import for samlify to fix ESM compatibility #25103

Closed
opened 2026-04-15 22:43:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8769
Author: @ping-maxwell
Created: 3/25/2026
Status: Closed

Base: canaryHead: pr-8697-to-canary


📝 Commits (1)

  • e9c1603 fix(sso): use namespace import for samlify to fix ESM compatibility

📄 Description

samlify is a CJS module that sets __esModule: true but has no exports.default. Using import saml from "samlify" resolves to undefined in ESM runtimes, causing saml.setSchemaValidator(...) to throw TypeError at module load time.

Switch to import * as saml from "samlify" which correctly provides the full namespace object with all named exports.

Also updates the smoke test to use native ESM import instead of createRequire, so this regression is caught in CI.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8769 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 3/25/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `pr-8697-to-canary` --- ### 📝 Commits (1) - [`e9c1603`](https://github.com/better-auth/better-auth/commit/e9c160376216cb646ddbc1a5bf3d3a1ab655a01b) fix(sso): use namespace import for samlify to fix ESM compatibility ### 📄 Description samlify is a CJS module that sets __esModule: true but has no exports.default. Using `import saml from "samlify"` resolves to undefined in ESM runtimes, causing `saml.setSchemaValidator(...)` to throw TypeError at module load time. Switch to `import * as saml from "samlify"` which correctly provides the full namespace object with all named exports. Also updates the smoke test to use native ESM import instead of createRequire, so this regression is caught in CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:43:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25103