File tree Expand file tree Collapse file tree
packages/stack-shared/src/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -822,8 +822,10 @@ export async function sanitizeEnvironmentConfig<T extends EnvironmentRenderedCon
822822export async function sanitizeOrganizationConfig ( config : OrganizationRenderedConfigBeforeSanitization ) {
823823 assertNormalized ( config ) ;
824824 const prepared = await sanitizeEnvironmentConfig ( config ) ;
825+
825826 const themes : typeof prepared . emails . themes = prepared . emails . themes ;
826827 const templates : typeof prepared . emails . templates = config . emails . server . isShared ? DEFAULT_EMAIL_TEMPLATES : prepared . emails . templates ;
828+
827829 const products = typedFromEntries ( typedEntries ( prepared . payments . products ) . map ( ( [ key , product ] ) => {
828830 const isAddOnTo = product . isAddOnTo === false ?
829831 false as const :
@@ -845,6 +847,13 @@ export async function sanitizeOrganizationConfig(config: OrganizationRenderedCon
845847
846848 return {
847849 ...prepared ,
850+ auth : {
851+ ...prepared . auth ,
852+ oauth : {
853+ ...prepared . auth . oauth ,
854+ providers : typedFromEntries ( typedEntries ( prepared . auth . oauth . providers ) . filter ( ( [ key , value ] ) => value . type !== undefined ) ) ,
855+ } ,
856+ } ,
848857 emails : {
849858 ...prepared . emails ,
850859 selectedThemeId : has ( themes , prepared . emails . selectedThemeId ) ? prepared . emails . selectedThemeId : DEFAULT_EMAIL_THEME_ID ,
You can’t perform that action at this time.
0 commit comments