fatedier/frp · error

invalid auth additional scopes, optional values are %v

Error message

invalid auth additional scopes, optional values are %v

What it means

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

Source

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

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"))
	errs = AppendError(errs, ValidatePort(c.VhostHTTPPort, "vhostHTTPPort"))
	errs = AppendError(errs, ValidatePort(c.VhostHTTPSPort, "vhostHTTPSPort"))
	errs = AppendError(errs, ValidatePort(c.TCPMuxHTTPConnectPort, "tcpMuxHTTPConnectPort"))

View on GitHub (pinned to 6c8a8d0a97)

Solutions

  1. Keep only the supported values in auth.additionalScopes, as listed in the error message.
  2. Remove the unsupported scope from auth.additionalScopes in the server configuration.

When it happens

Trigger: Raised by ValidateServerConfig in pkg/config/v1/validation/server.go when auth.additionalScopes contains a scope outside the supported set.

Common situations: An unknown scope name in auth.additionalScopes. Fix by keeping only the scopes listed in the error message.


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