Skip to content

fix: Handle missing Joi.binary() for Cloudflare Workers compatibility #769

Open
aks96 wants to merge 2 commits intomasterfrom
SDK-7685
Open

fix: Handle missing Joi.binary() for Cloudflare Workers compatibility #769
aks96 wants to merge 2 commits intomasterfrom
SDK-7685

Conversation

@aks96
Copy link
Contributor

@aks96 aks96 commented Jan 28, 2026

Description

On trying to deploy express-oidc on cloudfare workers getting error Uncaught TypeError: Joi.binary is not a function
at null.

Scope

This fix allows the SDK to initialize in cloudfare workers. But full support would require a larger migratiom (under development)

Changes

To support the joi.binary added the polyfill for fallback where it is not available.
The fix uses joi.binary() in node.js and falls back to the custom validator in environments like cloudfare workers where joi.binary is not avaialble.

Tests

  • All unit tests and end-to-end tests pass
  • Checked with simulated fallback tests

@aks96 aks96 requested a review from a team as a code owner January 28, 2026 08:55
@aks96 aks96 changed the title fix:cloudfare worker support added to with polyfill fix: Handle missing Joi.binary() for Cloudflare Workers compatibility Jan 28, 2026
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

Comments