fatedier/frp · error

invalid auth method, optional values are %v

Error message

invalid auth method, optional values are %v

What it means

Error "invalid auth method, optional values are %v" thrown in fatedier/frp.

Source

Thrown at pkg/config/v1/validation/server.go:32

package validation

import (
	"fmt"
	"slices"

	"github.com/samber/lo"

	v1 "github.com/fatedier/frp/pkg/config/v1"
)

func (v *ConfigValidator) ValidateServerConfig(c *v1.ServerConfig) (Warning, error) {
	var (
		warnings Warning
		errs     error
	)
	if !slices.Contains(SupportedAuthMethods, c.Auth.Method) {
		errs = AppendError(errs, fmt.Errorf("invalid auth method, optional values are %v", SupportedAuthMethods))
	}
	if !lo.Every(SupportedAuthAdditionalScopes, c.Auth.AdditionalScopes) {
		errs = AppendError(errs, fmt.Errorf("invalid auth additional scopes, optional values are %v", SupportedAuthAdditionalScopes))
	}

	errs = AppendError(errs, v.validateAuthTokenSource(c.Auth.Token, c.Auth.TokenSource))

	if err := validateLogConfig(&c.Log); err != nil {
		errs = AppendError(errs, err)
	}

	if err := validateWebServerConfig(&c.WebServer); err != nil {
		errs = AppendError(errs, err)
	}

	errs = AppendError(errs, ValidatePort(c.BindPort, "bindPort"))
	errs = AppendError(errs, ValidatePort(c.KCPBindPort, "kcpBindPort"))
	errs = AppendError(errs, ValidatePort(c.QUICBindPort, "quicBindPort"))

View on GitHub (pinned to 6c8a8d0a97)

Solutions

  1. Set auth.method to one of the supported values listed in the error message (for example 'token' or 'oidc').
  2. Remove auth.method to use the default authentication method.

When it happens

Trigger: Raised by ValidateServerConfig in pkg/config/v1/validation/server.go when auth.method is not one of the supported authentication methods (token or oidc).

Common situations: Typo or unsupported value in auth.method of the server config. Fix by setting auth.method to one of the values listed in the error message.


AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15). Data as JSON: /api/errors/1bd66fc6a4f224c2. Report an issue: GitHub.