Skip to content

fix: allow Auth0 lowercase template variables to pass keyword placeholder validation#1408

Open
harshithRai wants to merge 1 commit into
masterfrom
ESD-63207
Open

fix: allow Auth0 lowercase template variables to pass keyword placeholder validation#1408
harshithRai wants to merge 1 commit into
masterfrom
ESD-63207

Conversation

@harshithRai

Copy link
Copy Markdown
Contributor

Auth0 SMS connections support native template variables like @@password@@ that were being incorrectly flagged as unresolved keyword placeholders, causing imports to fail.

🔧 Changes

  • Tightened the unresolved placeholder regex to only match uppercase patterns ([A-Z0-9_]), aligning with the established deploy-cli keyword convention (@@MY_KEY@@, ##MY_SECRET##). Lowercase Auth0-native template variables are no longer flagged as unresolved.

📚 References

Auth0 SMS template variables documentation

🔬 Testing

Unit tests:

  • Updated an existing test in test/tools/utils.test.js to include a lowercase @@...@@ value, confirming it no longer throws

Manual end-to-end:

  • Created an SMS passwordless connection in a test tenant with template: @@password@@
  • Exported the tenant with a0deploy export --format yaml
  • Before applying fix: import failed with Unresolved placeholder(s) found in connections: "options.template": @@password@@
  • After applying fix: import completed successfully - SMS connection updated without error
  • Confirmed uppercase unresolved placeholders (e.g. ##CONNECTIONS_OAUTH2_SECRET##) still correctly throw an error

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.19%. Comparing base (fedb588) to head (1da5fcc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1408   +/-   ##
=======================================
  Coverage   80.19%   80.19%           
=======================================
  Files         153      153           
  Lines        7119     7119           
  Branches     1573     1573           
=======================================
  Hits         5709     5709           
  Misses        760      760           
  Partials      650      650           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@harshithRai harshithRai changed the title fix: allow Auth0 lowercase template variables (e.g. @@password@@) to pass keyword placeholder validation fix: allow Auth0 lowercase template variables to pass keyword placeholder validation Jun 23, 2026
@harshithRai harshithRai marked this pull request as ready for review June 23, 2026 14:58
@harshithRai harshithRai requested a review from a team as a code owner June 23, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants