{"record":{"id":"061858485b5e8653","repo":"goharbor/harbor","slug":"the-auth-mode-s-does-not-support-this-flow","errorCode":null,"errorMessage":"the auth mode %s does not support this flow","messagePattern":"the auth mode (.+?) does not support this flow","errorType":"http","errorClass":null,"httpStatus":412,"severity":"error","filePath":"src/core/controllers/authproxy_redirect.go","lineNumber":48,"sourceCode":"\tpostURIKey        = \"postURI\"\n)\n\nvar helper = &authproxy.Auth{}\n\n// AuthProxyController handles requests with token that can be reviewed by authproxy.\ntype AuthProxyController struct {\n\tapi.BaseController\n}\n\n// Prepare checks the auth mode and fail early\nfunc (apc *AuthProxyController) Prepare() {\n\tam, err := config.AuthMode(apc.Context())\n\tif err != nil {\n\t\tapc.SendInternalServerError(err)\n\t\treturn\n\t}\n\tif am != common.HTTPAuth {\n\t\tapc.SendPreconditionFailedError(fmt.Errorf(\"the auth mode %s does not support this flow\", am))\n\t\treturn\n\t}\n}\n\n// HandleRedirect reviews the token and login the user based on the review status.\nfunc (apc *AuthProxyController) HandleRedirect() {\n\ttoken := apc.Ctx.Request.URL.Query().Get(authproxyTokenKey)\n\tif token == \"\" {\n\t\tlog.Errorf(\"No token found in request.\")\n\t\tapc.Ctx.Redirect(http.StatusMovedPermanently, \"/\")\n\t\treturn\n\t}\n\tu, err := helper.VerifyToken(apc.Context(), token)\n\tif err != nil {\n\t\tlog.Errorf(\"Failed to verify token, error: %v\", err)\n\t\tapc.Ctx.Redirect(http.StatusMovedPermanently, \"/\")\n\t\treturn\n\t}","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/core/controllers/authproxy_redirect.go#L30-L66","documentation":"Error \"the auth mode %s does not support this flow\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/core/controllers/authproxy_redirect.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}