Skip to content

Conversation

@eiman-eltigani-ttd
Copy link
Contributor

@eiman-eltigani-ttd eiman-eltigani-ttd commented Nov 10, 2025

Summary/ key changes to get this running on node.js we had to replicate (polyfill) the same functionality from the browser:

  • Use jsdom to simulate browser DOM (as used in testing) and set all the objects needed (window, navigation,localStorage) for SDK to function like for token storage and amking network requests
  • Add the CORS layer for making network request by including Origin headers (or else will result in error: HTTP 403 Forbidden — Origin not allowed)
  • Custom Callback handling since there are no UI event listeners

@eiman-eltigani-ttd eiman-eltigani-ttd marked this pull request as ready for review November 10, 2025 21:04
# Client-Side Token Generation (CSTG) - Provided by your EUID integration representative
UID_CSTG_SERVER_PUBLIC_KEY="your-euid-server-public-key"
UID_CSTG_SUBSCRIPTION_ID="your-euid-subscription-id"
UID_CSTG_ORIGIN="your-app-url.com" # The public URL where this application is deployed (e.g., https://your-domain.com or http://localhost:3034 for local dev)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added since we have to replicate our own CORS/origin header on node.js

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.

2 participants