Skip to content

Commit

Permalink
DXCDT-576: Prevent themeID from getting sent to the web app (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught committed Nov 1, 2023
1 parent e5b120f commit d082118
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/cli/universal_login_customize.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ func fetchUniversalLoginBrandingData(
func fetchBrandingThemeOrUseDefault(ctx context.Context, api *auth0.API) *management.BrandingTheme {
currentTheme, err := api.BrandingTheme.Default(ctx)
if err == nil {
currentTheme.ID = nil
return currentTheme
}

Expand Down Expand Up @@ -548,10 +549,9 @@ func saveUniversalLoginBrandingData(ctx context.Context, api *auth0.API, data *u
})

group.Go(func() (err error) {
themeID := data.Theme.GetID()
if themeID != "" {
data.Theme.ID = nil
return api.BrandingTheme.Update(ctx, themeID, data.Theme)
existingTheme, err := api.BrandingTheme.Default(ctx)
if err == nil {
return api.BrandingTheme.Update(ctx, existingTheme.GetID(), data.Theme)
}

return api.BrandingTheme.Create(ctx, data.Theme)
Expand Down

0 comments on commit d082118

Please sign in to comment.