Enhance Provider struct to include Label field for improved provider identification

- Added Label field to the Provider struct in types.go to allow for better identification of third-party login providers.
- Updated createPublicConfig function in signin.go to populate the new Label field when creating public provider configurations.
This commit is contained in:
Max 2025-09-12 18:50:28 +08:00
parent 5a23afb22c
commit 426fec1608
2 changed files with 2 additions and 0 deletions

View file

@ -512,6 +512,7 @@ func createPublicConfig(fullConfig *Config) Config {
publicProvider := Provider{
ID: provider.ID,
Title: provider.Title,
Label: provider.Label,
Logo: provider.Logo,
Color: provider.Color,
TextColor: provider.TextColor,

View file

@ -76,6 +76,7 @@ type YaoClientConfig struct {
// Provider represents a third party login provider
type Provider struct {
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Title string `json:"title,omitempty"`
Logo string `json:"logo,omitempty"`
Color string `json:"color,omitempty"`