{"record":{"id":"67bef6920f5bfd26","repo":"netbirdio/netbird","slug":"getting-a-request-oauth-flow-info-failed-v-67bef6","errorCode":null,"errorMessage":"getting a request OAuth flow info failed: %v","messagePattern":"getting a request OAuth flow info failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/cmd/login.go","lineNumber":418,"sourceCode":"\nfunc foregroundGetTokenInfo(ctx context.Context, cmd *cobra.Command, config *profilemanager.Config, profileID profilemanager.ID) (*auth.TokenInfo, error) {\n\thint := \"\"\n\tpm := profilemanager.NewProfileManager()\n\tprofileState, err := pm.GetProfileState(profileID)\n\tif err != nil {\n\t\tlog.Debugf(\"failed to get profile state for login hint: %v\", err)\n\t} else if profileState.Email != \"\" {\n\t\thint = profileState.Email\n\t}\n\n\toAuthFlow, err := auth.NewOAuthFlow(ctx, config, util.HasGraphicalSession(), false, hint)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tflowInfo, err := oAuthFlow.RequestAuthInfo(context.TODO())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting a request OAuth flow info failed: %v\", err)\n\t}\n\n\topenURL(cmd, flowInfo.VerificationURIComplete, flowInfo.UserCode, noBrowser, showQR)\n\n\ttokenInfo, err := oAuthFlow.WaitToken(context.TODO(), flowInfo)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"waiting for browser login failed: %v\", err)\n\t}\n\n\treturn &tokenInfo, nil\n}\n\nfunc openURL(cmd *cobra.Command, verificationURIComplete, userCode string, noBrowser, showQR bool) {\n\tvar codeMsg string\n\tif userCode != \"\" && !strings.Contains(verificationURIComplete, userCode) {\n\t\tcodeMsg = fmt.Sprintf(\"and enter the code %s to authenticate.\", userCode)\n\t}\n","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/cmd/login.go#L400-L436","documentation":"oAuthFlow.RequestAuthInfo failed: the HTTP request to management's OAuth device-authorization endpoint (RFC 8628 device grant, e.g. POST /api/oauth/device-authorize) returned a transport error or a non-success status. Management only serves this endpoint when an IdP/OIDC provider is configured; a management without SSO, an unreachable management, or an IdP-side failure all surface here.","triggerScenarios":"No IdP configured on management (endpoint rejects or 404s); management unreachable (network/DNS/TLS); IdP down or its client ID/issuer misconfigured in management settings; HTTP proxy interfering with the POST; non-200 response from the authorize endpoint.","commonSituations":"Self-hosted management deployed without completing the OIDC integration steps, then a client tries interactive login instead of a setup key; IdP maintenance windows; Management URL behind a load balancer whose cert does not match; Corporate proxies stripping or buffering the authorization request","solutions":["Verify management is reachable and healthy (curl the base URL)","Confirm SSO/IdP is configured on the management instance and test it from the dashboard","If SSO is not intended, skip interactive login and use a setup key instead","Check management logs for the failing device-authorize request and any IdP error it records"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify management reachability and SSO capability before starting the flow\nresp, err := http.Get(config.ManagementURL + \"/api/peers\")\nif err != nil || resp.StatusCode >= 500 {\n    return fmt.Errorf(\"management unhealthy: %v\", err)\n}\nif !managementHasIdP {\n    return fmt.Errorf(\"SSO not configured on management; use a setup key\")\n}","typeGuard":null,"tryCatchPattern":"flowInfo, err := oAuthFlow.RequestAuthInfo(context.Background())\nif err != nil {\n    return fmt.Errorf(\"getting a request OAuth flow info failed: %w\", err)\n}","preventionTips":["Complete IdP configuration on management before enabling interactive logins","Monitor the device-authorize endpoint on management for 4xx/5xx spikes","Avoid passing the flow through proxies that rewrite POST bodies"],"tags":["sso","oauth","http","management","netbird"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}