netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Invalid hostname in iOS app

Open ydkn opened this issue 1 year ago • 13 comments

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

ydkn avatar Jan 20 '24 12:01 ydkn

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.

pascal-fischer avatar Jan 22 '24 09:01 pascal-fischer

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

firestrife23 avatar Jan 31 '24 04:01 firestrife23

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

mlsmaycon avatar Jan 31 '24 09:01 mlsmaycon

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

mlsmaycon avatar Jan 31 '24 18:01 mlsmaycon

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

firestrife23 avatar Feb 01 '24 02:02 firestrife23

@firestrife23 what is your app version?

mlsmaycon avatar Feb 03 '24 09:02 mlsmaycon

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

firestrife23 avatar Feb 03 '24 16:02 firestrife23

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.

pascal-fischer avatar Feb 06 '24 12:02 pascal-fischer

https://n0where.casa

firestrife23 avatar Feb 06 '24 12:02 firestrife23

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?

pascal-fischer avatar Feb 06 '24 13:02 pascal-fischer

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"
            ]
	}
    },

firestrife23 avatar Feb 07 '24 03:02 firestrife23

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

  • remove the auth flow configurations completely (this will force the app to fall back to setup keys) but then you will only be able to add clients via setup keys and not SSO
  • fix the configuration following the docs

pascal-fischer avatar Feb 07 '24 15:02 pascal-fischer

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.

firestrife23 avatar Feb 10 '24 17:02 firestrife23