[GH-ISSUE #1531] Request failed with status code 401. Please refresh the page if the issue continues. token invalid [AUTHENTIK] #2620

Closed
opened 2026-08-05 00:48:06 -04:00 by saavagebueno · 6 comments
Owner

Originally created by @barto95100 on GitHub (Feb 5, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1531

when i test to login i received Request failed with status code 401. Please refresh the page if the issue continues.
token invalid

CleanShot 2024-02-05 at 19 03 24

I don't know why :( ... I loose all of my peer ....
but the connection netbird app work and access of peer work

Originally created by @barto95100 on GitHub (Feb 5, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1531 when i test to login i received Request failed with status code 401. Please refresh the page if the issue continues. token invalid ![CleanShot 2024-02-05 at 19 03 24](https://github.com/netbirdio/netbird/assets/17863254/36fa718c-2bc3-4aed-830f-091394bcebde) I don't know why :( ... I loose all of my peer .... but the connection netbird app work and access of peer work
saavagebueno added the idptriage-neededauthentik labels 2026-08-05 00:48:06 -04:00
Author
Owner

@Fantu commented on GitHub (Feb 6, 2024):

I think that NETBIRD_MGMT_IDP_SIGNKEY_REFRESH=true to setup.env of your netbird self-hosted will avoid this

<!-- gh-comment-id:1929102315 --> @Fantu commented on GitHub (Feb 6, 2024): I think that `NETBIRD_MGMT_IDP_SIGNKEY_REFRESH=true` to setup.env of your netbird self-hosted will avoid this
Author
Owner

@barto95100 commented on GitHub (Feb 6, 2024):

The problem is the same .... :(

<!-- gh-comment-id:1929316895 --> @barto95100 commented on GitHub (Feb 6, 2024): The problem is the same .... :(
Author
Owner

@barto95100 commented on GitHub (Feb 6, 2024):

I don't know what's happened but now i don't have the error message but nothing showed on dashboard....

for information I just change the authentik server ...

<!-- gh-comment-id:1929353115 --> @barto95100 commented on GitHub (Feb 6, 2024): I don't know what's happened but now i don't have the error message but nothing showed on dashboard.... for information I just change the authentik server ...
Author
Owner

@Pshemas commented on GitHub (Jul 27, 2024):

Has anyone managed to solve it? Here's what I see in the logs:

2024-07-27T14:17:05Z DEBG management/server/account.go:1239: account cpk3ikv7g7ts73c049h0 not found in cache, reloading
2024-07-27T14:17:05Z DEBG management/server/idp/authentik.go:134: requesting new jwt token for authentik idp manager
2024-07-27T14:17:05Z ERRO [context: HTTP, requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a] management/server/http/middleware/auth_middleware.go:89: Error when validating JWT claims: unable to get authentik token, statusCode 400
2024-07-27T14:17:05Z ERRO [requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a, context: HTTP] management/server/http/util/util.go:81: got a handler error: token invalid
2024-07-27T14:17:05Z ERRO [requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a, context: HTTP] management/server/telemetry/http_api_metrics.go:191: HTTP response d5349073-3a72-4293-bb39-0e4c7eb0844a: GET /api/users status 401
2024-07-27T14:17:05Z DEBG [context: HTTP, requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a] management/server/telemetry/http_api_metrics.go:211: request GET /api/users took 304 ms and finished with status 401

And it's my current theme with Netbird - initially it works, then after a while I get this error. Tried updating geo db as suggested in one of the topics, added NETBIRD_MGMT_IDP_SIGNKEY_REFRESH=true etc - so far no luck.

<!-- gh-comment-id:2254163640 --> @Pshemas commented on GitHub (Jul 27, 2024): Has anyone managed to solve it? Here's what I see in the logs: ``` 2024-07-27T14:17:05Z DEBG management/server/account.go:1239: account cpk3ikv7g7ts73c049h0 not found in cache, reloading 2024-07-27T14:17:05Z DEBG management/server/idp/authentik.go:134: requesting new jwt token for authentik idp manager 2024-07-27T14:17:05Z ERRO [context: HTTP, requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a] management/server/http/middleware/auth_middleware.go:89: Error when validating JWT claims: unable to get authentik token, statusCode 400 2024-07-27T14:17:05Z ERRO [requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a, context: HTTP] management/server/http/util/util.go:81: got a handler error: token invalid 2024-07-27T14:17:05Z ERRO [requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a, context: HTTP] management/server/telemetry/http_api_metrics.go:191: HTTP response d5349073-3a72-4293-bb39-0e4c7eb0844a: GET /api/users status 401 2024-07-27T14:17:05Z DEBG [context: HTTP, requestID: d5349073-3a72-4293-bb39-0e4c7eb0844a] management/server/telemetry/http_api_metrics.go:211: request GET /api/users took 304 ms and finished with status 401 ``` And it's my current theme with Netbird - initially it works, then after a while I get this error. Tried updating geo db as suggested in one of the topics, added `NETBIRD_MGMT_IDP_SIGNKEY_REFRESH=true` etc - so far no luck.
Author
Owner

@nazarewk commented on GitHub (Apr 23, 2025):

@barto95100 @Pshemas were you able resolve the issue?

<!-- gh-comment-id:2825052398 --> @nazarewk commented on GitHub (Apr 23, 2025): @barto95100 @Pshemas were you able resolve the issue?
Author
Owner

@TechHutTV commented on GitHub (May 9, 2026):

This looks like the same Authentik signkey-refresh symptom tracked in #2142 (and #1657, #2941). The known workaround is NETBIRD_MGMT_IDP_SIGNKEY_REFRESH=true on the management deployment. Closing as duplicate; please follow #2142 for updates.

<!-- gh-comment-id:4413388020 --> @TechHutTV commented on GitHub (May 9, 2026): This looks like the same Authentik signkey-refresh symptom tracked in #2142 (and #1657, #2941). The known workaround is `NETBIRD_MGMT_IDP_SIGNKEY_REFRESH=true` on the management deployment. Closing as duplicate; please follow #2142 for updates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#2620