Skip to content

Commit

Permalink
add optional iframeUrl param
Browse files Browse the repository at this point in the history
  • Loading branch information
turnekybc committed Dec 17, 2024
1 parent 8b5d22b commit 12d5aaa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/wise-donkeys-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@turnkey/sdk-browser": patch
"@turnkey/sdk-react": patch
---

Update TurnkeySDKBrowserConfig type with an optional iframeUrl field. The TurnkeyContext provider will check for an iframeUrl otherwise it will fallback to the default.
1 change: 1 addition & 0 deletions packages/sdk-browser/src/__types__/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export interface TurnkeySDKBrowserConfig {
defaultOrganizationId: string;
rpId?: string;
serverSignUrl?: string;
iframeUrl?: string;
}

export type queryOverrideParams = {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-react/src/contexts/TurnkeyContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const TurnkeyProvider: React.FC<TurnkeyProviderProps> = ({
iframeContainer: document.getElementById(
TurnkeyAuthIframeContainerId
),
iframeUrl: "https://auth.turnkey.com",
iframeUrl: config.iframeUrl || "https://auth.turnkey.com",
iframeElementId: TurnkeyAuthIframeElementId,
});
setAuthIframeClient(newAuthIframeClient);
Expand Down

0 comments on commit 12d5aaa

Please sign in to comment.