A guide to integrating Dynamic for user authentication, onboarding, and embedded wallets on Linera’s real-time Web3 platform.
crossOriginIsolated
to be true for optimal performance in real-time applications, which is enabled by setting specific security headers (Cross-Origin-Embedder-Policy: credentialless
, Cross-Origin-Opener-Policy: same-origin
, and Cross-Origin-Resource-Policy: cross-origin
). However, Dynamic’s authentication iframes from dynamicauth.com
don’t have the required headers, causing them to be blocked.
What it does: The shim intercepts iframe creation and automatically sets the credentialless
attribute on Dynamic’s auth iframes, allowing them to load within the secure context required by Linera’s high-performance WebAssembly environment - essential for real-time games, instant payments, and live social feeds.
Add this script to your index.html
before any other scripts:
linera-adapter.ts
:
Signer
interface for optimal performance, while Dynamic wallets provide familiar signing flows that users already trust. The signer bridges these two worlds, ensuring smooth authentication for time-sensitive transactions.
What it does:
Signer
interface using Dynamic’s trusted wallet capabilitiespersonal_sign
directly to minimize signing delays in real-time applicationsdynamic-signer.ts
: