Skip to content

Commit 7a489a5

Browse files
authored
Merge pull request #167 from dtoxvanilla1991/fix/double-auth-strict
Remove double token exchange in dev strict mode
2 parents b7551bf + 1a0044a commit 7a489a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/state/KindeProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,12 +574,12 @@ export const KindeProvider = ({
574574
if (initRef.current) return;
575575
try {
576576
try {
577+
initRef.current = true;
577578
await checkAuth({ domain, clientId });
578579
} catch (err) {
579580
console.warn("checkAuth failed:", err);
580581
setState((v: ProviderState) => ({ ...v, isLoading: false }));
581582
}
582-
initRef.current = true;
583583
const params = new URLSearchParams(window.location.search);
584584

585585
if (params.has("error")) {

0 commit comments

Comments
 (0)