Skip to content

Commit d93ec63

Browse files
fix(inApp): fix passkeyDomain prop not being respected on login web (#4239)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on fixing the passkey domain issue in the authentication process. ### Detailed summary - Updated `types.ts` to remove optional domain object - Modified `web-connector.ts` to use `passkeyDomain` instead of domain object for `rp` properties > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent a7f4484 commit d93ec63

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.changeset/selfish-adults-jump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix passkey domain not being respected on login

packages/thirdweb/src/wallets/in-app/core/authentication/types.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ export type SingleStepAuthArgsType =
4747
* Optional name of the passkey to create, defaults to a generated name
4848
*/
4949
passkeyName?: string;
50-
/**
51-
* Optional domain, defaults to current window location.
52-
* NOTE: this is required on native platforms.
53-
*/
54-
domain?: {
55-
displayName: string;
56-
hostname: string;
57-
};
5850
}
5951
| {
6052
strategy: "wallet";

packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ export class InAppWebConnector implements InAppConnector {
314314
passkeyClient,
315315
storage,
316316
rp: {
317-
id: args.domain?.hostname ?? window.location.hostname,
318-
name: args.domain?.displayName ?? window.document.title,
317+
id: this.passkeyDomain ?? window.location.hostname,
318+
name: this.passkeyDomain ?? window.document.title,
319319
},
320320
});
321321
}

0 commit comments

Comments
 (0)