netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 486 forks source link

Invalid hostname in iOS app #1487

Open ydkn opened 8 months ago

ydkn commented 8 months ago

Describe the problem I trying to set a custom server in the iOS app with a .network domain is not possible because it thinks it is an invalid address.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Change Server'
  2. Enter 'https://foobar.network' into the server input field
  3. See error 'Invalid server address'

Expected behavior The server address is not assumed to be invalid and it is possible to save.

Version: 0.0.1

Screenshots ios-dot-network

pascal-fischer commented 8 months ago

Hi @ydkn,

thanks for reporting the issue. We are aware and have fixed it in our development version. We will release a new version of the app pretty soon so I would kindly ask you to wait a bit more before the fix will be published.

firestrife23 commented 8 months ago

Am I supposed to wait for it with bated breath? I can't contain my excitement!

mlsmaycon commented 8 months ago

Hello @ydkn @firestrife23 the version with fix is waiting for review now and we expect to be released soon.

mlsmaycon commented 8 months ago

Hey @ydkn @firestrife23 the new version is now available. Please let us know if the issue persists.

firestrife23 commented 8 months ago

The issue persists. My domain's TLD is .casa and I don't know if that's helpful.

mlsmaycon commented 8 months ago

@firestrife23 what is your app version?

firestrife23 commented 8 months ago

0.0.2, using self-hosted with Keycloak as ID provider.

pascal-fischer commented 8 months ago

Can you share your full domain or a similar one that is failing for you? I tried to reproduce but I did not encounter any issues. One thing I could imagine is that you have a space at the end? Now I added trimming to the text boxes to ignore spaces.

firestrife23 commented 8 months ago

https://n0where.casa

pascal-fischer commented 8 months ago

I checked the domain and it is not the initial URL validation but the SSO lookup. The iOS app is not able to detect what authentication flow is used by the server. I checked the Android client and it is not able to detect it either. Can you check your management configuration for DeviceAuthorizationFlow and/or PKCEAuthorizationFlow. When you connect a desktop client do you use the user login or only setup-keys?

firestrife23 commented 8 months ago

I use only setup-keys for desktop clients.

    },
    "DeviceAuthorizationFlow": {
        "Provider": "hosted",
        "ProviderConfig": {
            "ClientID": "netbird-client",
            "ClientSecret": "",
            "Domain": "REDACTED",
            "Audience": "netbird-client",
            "TokenEndpoint": "https://REDACTED/realms/REDACTED/protocol/openid-connect/token",
            "DeviceAuthEndpoint": "https://REDACTED/realms/REDACTED/protocol/openid-connect/auth/device",
            "AuthorizationEndpoint": "",
            "Scope": "openid",
            "UseIDToken": false,
            "RedirectURLs": null
        }
    },
    "PKCEAuthorizationFlow": {
        "ProviderConfig": {
            "ClientID": "netbird-client",
            "ClientSecret": "",
            "Domain": "",
            "Audience": "netbird-client",
            "TokenEndpoint": "https://REDACTED/realms/REDACTED/protocol/openid-connect/token",
            "DeviceAuthEndpoint": "",
            "AuthorizationEndpoint": "https://REDACTED/realms/REDACTED/protocol/openid-connect/auth",
            "Scope": "openid profile email offline_access api",
            "UseIDToken": false,
            "RedirectURLs": [
                "http://localhost:53000"
            ]
    }
    },
pascal-fischer commented 8 months ago

It looks like your auth flow configurations are incomplete, which is why the app can not connect. So now you have 2 options:

firestrife23 commented 7 months ago

I decided to create a backup of my initial setup and start fresh to determine if the issue can be reproducible. I followed your documentation on the advanced guide and Keycloak idP for self-hosted. However, I'm still experiencing difficulty logging in with the iOS app.

By the way the screenshots on your documents is slightly different from more recent version of Keycloak.