Skip to content
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/tall-melons-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix revalidation with siwe auth in ConnectEmbed
5 changes: 3 additions & 2 deletions packages/thirdweb/src/react/core/hooks/auth/useSiweAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ export function useSiweAuth(
}
return authOptions.isLoggedIn(activeAccount.address);
},
gcTime: 0,
placeholderData: false,
refetchOnWindowFocus: false,
});

const loginMutation = useMutation({
mutationKey: ["siwe_auth", "login"],
mutationKey: ["siwe_auth", "login", activeAccount?.address],
mutationFn: async () => {
if (!authOptions) {
throw new Error("No auth options provided");
Expand Down Expand Up @@ -117,7 +118,7 @@ export function useSiweAuth(
});

const logoutMutation = useMutation({
mutationKey: ["siwe_auth", "logout"],
mutationKey: ["siwe_auth", "logout", activeAccount?.address],
mutationFn: async () => {
if (!authOptions) {
throw new Error("No auth options provided");
Expand Down
Loading