-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR_UNAUTHORIZED Request failed with status code 401 #452
Comments
Hey @dcshoes23 You can send this info on Slack (DM). |
Relates to goauthentik/authentik#3555 |
I think that we can close this one @dcshoes23. Since the issues have been resolved and Authentik is now compatible with NetBird! |
|
Found the issue, netbird is not setting the |
The user info endpoint, right? There must be something with related to the OIDC library. Will check that |
Also trying out netbird currently (great project btw) and I've noticed one error seems to come from the netbird frontend injecting a slash into the well-known URL if you use the correct OIDC issuer for authentik, which ends with a trailing slash (https://id.beryju.org/application/o/netbird/), so if I remove that trailing slash in the UI I can login but get the same error as above, and API requests return |
See the issue linked above, I monkey-patched this in the compiled main.js file and I can now correctly set the issuer. However there's still some 401 errors but also a warning due to base64-encoding
I can't quite tell yet where the code that does this is from (and I feel like this is due to some missing base64 padding, which I dont think the spec asks for?) |
@dcshoes23 recently we added authentik integration, you can find the docs here: https://docs.netbird.io/selfhosted/identity-providers#authentik |
I have selfhosted netbird v0.9.0 using Authentik as my identity provider.
I am able to login using Authentik and I seee the following error in the UI:
I see two problems in the Chrome debug console.
https://auth.mydomain.com/application/o/userinfo/
fail due to a CORS error:Access to fetch at 'https://auth.mydomain.com/application/o/userinfo/' from origin 'https://nb.mydomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
NOTE: the call to
https://auth.mydomain.com/application/o/token/
works fine which I see is called byxhr.ts:88
vs the failing call which is directly fromoidc.ts:160
The token isn't valid
The text was updated successfully, but these errors were encountered: