netbirdio / dashboard

NetBird Management Service Web UI Panel
https://app.netbird.io
BSD 3-Clause "New" or "Revised" License
243 stars 51 forks source link

LogIn Error local development #382

Open Chauban opened 2 months ago

Chauban commented 2 months ago

Describe the problem

I have registered the auth0 and copy several key value in to the .local-config.json. After I open localhost:3000, the google account also has linked but it always result in Error. Like the image below

Are you using NetBird Cloud?

Please specify whether you use NetBird Cloud or self-host NetBird's control plane.

NetBird version

netbird version

NetBird status -d output:

If applicable, add the `netbird status -d' command output.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here. auth0-config002 ![Uploading error.png…]()

heisbrot commented 2 months ago

Hey @Chauban,

there are a few things I see from your config. The authScopesSupported, authAudience, apiOrigin and grpcApiOrigin is missing. You can also remove everything from redirectURI to googleAnalyticsID as these variables are not necessary.

A local config with Auth0 might look like this:

{
  "auth0Auth": "true",
  "authAuthority": "https://youraccount.eu.auth0.com",
  "authClientId": "kBXXAOqIXXXXXXVCaXXXCJvTzkXXIXVt",
  "authScopesSupported": "openid profile email api offline_access email_verified",
  "authAudience": "http://localhost:3000/", 
  "apiOrigin": "http://localhost",
  "grpcApiOrigin": "http://localhost:80",
} 

Hope this helps!

Best, Eduard

Chauban commented 2 months ago

Hey @Chauban,

there are a few things I see from your config. The authScopesSupported, authAudience, apiOrigin and grpcApiOrigin is missing. You can also remove everything from redirectURI to googleAnalyticsID as these variables are not necessary.

A local config with Auth0 might look like this:

{
  "auth0Auth": "true",
  "authAuthority": "https://youraccount.eu.auth0.com",
  "authClientId": "kBXXAOqIXXXXXXVCaXXXCJvTzkXXIXVt",
  "authScopesSupported": "openid profile email api offline_access email_verified",
  "authAudience": "http://localhost:3000/", 
  "apiOrigin": "http://localhost",
  "grpcApiOrigin": "http://localhost:80",
} 

Hope this helps!

Best, Eduard

Thanks for your response. Is it not necessary for the authClientSecret? I also change authAudience": "https://dev-domain.us.auth0.com/api/v2/", now I have the new problem in the image. Is it necassay to run backend netbitd in the same time? page-console-002

heisbrot commented 2 months ago

Hey @Chauban ,

If using Auth0 the clientSecret can be removed from the config.

You can just copy the config from above and replace authAuthority and authClientId with your values. In your case the authAudience should be http://localhost:3000/

For local development of the dashboard, the NetBird management server needs to be running. apiOrigin and grpcApiOrigin are your management server API endpoints, which are required to access the NetBird API.

Best, Eduard