Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eng 1441 context provider #454

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading