Network plugin problem with wifi auth

Hi everyone, in ionic 5 i am using the plugin network to understand when i am online. When the physical device connects to a wifi that requires authentication, the plugin issues on the onConnect method even if the user has not completed the authentication procedure.
In doing so, the system thinks it is connected but the first call fails because without authentication it cannot navigate.

This is the service that dispatches the line state change events

 checkLine() {
        if ('onLine' in navigator && navigator.onLine) {
            console.log('line status', navigator.onLine)
            this.store.dispatch(online())
        } else {
            console.log('line status', navigator.onLine)
            this.store.dispatch(offline())
        }
        if (this.platform.is('capacitor')) {
            this.network.onConnect().subscribe(() => {
                console.log('line status online')
                this.store.dispatch(online())
            })
            this.network.onDisconnect().subscribe(() => {
                console.log('line status offline')
                this.store.dispatch(offline())
            })
        } else {
            merge(
                of(navigator.onLine),
                fromEvent(window, 'online').pipe(mapTo(true)),
                fromEvent(window, 'offline').pipe(mapTo(false)),
            ).subscribe(l => {
                    if (l) {
                        this.store.dispatch(online())
                    } else {
                        this.store.dispatch(offline())
                    }
                }
            )
        }
    }

How can I solve this case?