JuanSeBestia / react-native-wifi-reborn

A react-native implementation for viewing and connecting to Wifi networks on Android and iOS devices.
ISC License
365 stars 124 forks source link

Connection successful even if password provided is wrong? #356

Open DavideViolante opened 10 months ago

DavideViolante commented 10 months ago

I'm trying to connect to the SSID and PSW provided by the user input (see wifiConfigDevice const):

    try {
      const wifiConfigDevice: DeviceWifiConfig = { wifiSsid, wifiPwd };
      // Force connection on the Wi-Fi the user provided
      await WifiManager.connectToProtectedSSID(wifiSsid, wifiPwd, false, false);
      ...
    } catch (error) {
      ...
      failToast(intl.formatMessage({ id: 'deviceStartupFail' }));
    }

After this code, even if the user types a wrong password, the connection is successful. Why is this happening? Is there any way to force the check of SSID and PSW of a WiFi to be sure the user types the correct credentials? I need to be sure the credentials are correct since we are saving those into a IoT device after this step.

Video on Android SDK 29 (Android 10): https://github.com/JuanSeBestia/react-native-wifi-reborn/assets/6844116/89bee5e3-7d44-459a-861d-10a6afae8950 In the video, the "ciaociaociao" psw is wrong for that network. Also if I'm not already connected, the psw check is skipped.

The only way it seems to work is when the phone never connected to that network before (forget network) and I try the first time using the library. In that case the psw is checked. But I need the psw to be checked always.

Thanks

github-actions[bot] commented 9 months ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

DavideViolante commented 9 months ago

Hello, any news about this @JuanSeBestia ? Thank you

JuanSeBestia commented 9 months ago

Feel free to try to fix it, then open a MR ❤️

DavideViolante commented 9 months ago

I wanted to be sure that it's a real bug or I'm doing something wrong. Anyone else experiecing the same issue? Can you reproduce it too?

wtlyu commented 9 months ago

Yes. same issues here.

github-actions[bot] commented 8 months ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

DavideViolante commented 8 months ago

This should not be closed at all.

github-actions[bot] commented 6 months ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

DavideViolante commented 6 months ago

@alexma01 Hello Ale, do you think you also fixed this issue in your PR #355 ?

github-actions[bot] commented 5 months ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

github-actions[bot] commented 1 month ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.

github-actions[bot] commented 1 week ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community attention? This issue may be closed if no further activity occurs.