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.17k stars 451 forks source link

failed to login after self-hosting netbird deployed with ip address #1291

Open UnknowViewer opened 9 months ago

UnknowViewer commented 9 months ago

Describe the problem

I deployed latest self-hosting Netbird in self-hosting mode, we have a public IP address but it's behind the firewall NAT, so I'm trying to install it with internal ip address and 80 port instead of domain name. I set NETBIRD_DOMAIN into 'use-ip' and installed successfully.

When I login the ip+port with init admin cred, it'll pending in seconds and return the error 'Login Error: User state: Unauthenticated'.

Checked in developer tools and notice that the POST request to 'http://addr/oauth/v2/token' was returned HTTP Code = 400 bad request error, version = HTTP/1.1, the resp body is:

{"error":"invalid_request","error_description":"code_challenge required"}

To Reproduce Steps to reproduce the behavior:

  1. deploy self-hosting Netbird with IP address, instead of domain name
  2. visit in web site

Expected behavior I should login to the Netbird dashboard after change the init password of admin account.

NetBird status -d output: If applicable, add the output of the netbird status -d command

Screenshots

Additional context

0FiRE0 commented 5 months ago

Same issue for the login. Please note that the Console Login is working fine. image

mlsmaycon commented 5 months ago

Hello,

Due to a limitation with our oidc lib this is not possible. The only URL without an SSL certificate it accepts is http://localhost.

See issue at https://github.com/AxaFrance/oidc-client/issues/1028