Providing web_origins to a0deploy through environment variables

Hello, I’m trying to override the following config.json file through environment variables provided by my Bitbucket pipelines:

{
	"AUTH0_DOMAIN": "my-domain.auth0.com",
	"AUTH0_CLIENT_ID": "fakevaluehere",
	"AUTH0_CLIENT_SECRET": "fakevaluehere",
	"AUTH0_KEYWORD_REPLACE_MAPPINGS": {
		"AUTH0_TENANT_NAME": "my-domain",
		"WEB_ORIGINS": [
			"http://localhost:3000",
			"https://my-domain.com"
		]
	},
	"AUTH0_ALLOW_DELETE": true
}

I keep getting the following error:
Bad Request: Payload validation error: 'Expected type array but found type string' on property web_origins (Comma-separated list of allowed origins for use with <a href='https://auth0.com/docs/cross-origin-authentication'>Cross-Origin Authentication</a>, <a href='https://auth0.com/docs/flows/concepts/device-auth'>Device Flow</a>, and <a href='https://auth0.com/docs/protocols/oauth2#how-response-mode-works'>web message response mode</a>).

How should I be providing the array as a string using environment variables please?

I wonder, is there any fix for this??

2 Likes

Found the answer in https://auth0.com/docs/extensions/deploy-cli-tool/environment-variables-and-keyword-mappings

You need to use @@WEB_ORIGINS@@ in your tenant yaml file.