Skip to content

Commit 5b5b241

Browse files
committed
fix: only process auth flow on callback URL
1 parent 5d92895 commit 5b5b241

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/state/KindeProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,8 @@ export const KindeProvider = ({
581581
}
582582

583583
const hasCode = params.has("code");
584-
if (!hasCode) {
584+
const isOnRedirectUri = window.location.href.startsWith(redirectUri);
585+
if (!hasCode || !isOnRedirectUri) {
585586
try {
586587
const user = await getUserProfile();
587588
if (user) {

0 commit comments

Comments
 (0)