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

Set default auth mode to prevent double popup #4274

Merged
merged 1 commit into from
Aug 24, 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
5 changes: 5 additions & 0 deletions .changeset/tame-badgers-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix popup and window auth modes conflicting on firefox
2 changes: 2 additions & 0 deletions packages/thirdweb/src/wallets/in-app/core/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
connector: InAppConnector,
): Promise<[Account, Chain]> {
if (
// if auth mode is not specified, the default is popup

Check warning on line 43 in packages/thirdweb/src/wallets/in-app/core/wallet/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/in-app/core/wallet/index.ts#L43

Added line #L43 was not covered by tests
createOptions?.auth?.mode !== "popup" &&
createOptions?.auth?.mode !== undefined &&

Check warning on line 45 in packages/thirdweb/src/wallets/in-app/core/wallet/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/in-app/core/wallet/index.ts#L45

Added line #L45 was not covered by tests
connector.authenticateWithRedirect
) {
const strategy = options.strategy;
Expand Down
Loading