File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -553,8 +553,13 @@ export const KindeProvider = ({
553553 const init = useCallback ( async ( ) => {
554554 if ( initRef . current ) return ;
555555 try {
556- await checkAuth ( { domain, clientId } ) ;
557- initRef . current = true ;
556+ try {
557+ await checkAuth ( { domain, clientId } ) ;
558+ } catch ( err ) {
559+ console . warn ( "checkAuth failed:" , err ) ;
560+ setState ( ( v : ProviderState ) => ( { ...v , isLoading : false } ) ) ;
561+ }
562+ initRef . current = true ;
558563 const params = new URLSearchParams ( window . location . search ) ;
559564
560565 if ( params . has ( "error" ) ) {
@@ -611,6 +616,7 @@ export const KindeProvider = ({
611616 window . location . origin ,
612617 ) ;
613618 window . close ( ) ;
619+ return ;
614620 }
615621 await processAuthResult ( new URLSearchParams ( window . location . search ) ) ;
616622 } finally {
You can’t perform that action at this time.
0 commit comments