From a7b24dad723721c7ae3cbd1f31526c83679fd12d Mon Sep 17 00:00:00 2001 From: ramya18101 Date: Mon, 22 Jun 2026 10:59:42 +0530 Subject: [PATCH 1/2] refactor: remove deprecated screen-to-prompt mapping from docs --- .github/GITHUB_ACTIONS.md | 15 +- react-js/.github/GITHUB_ACTIONS.md | 109 +++------------ .../scripts/process-screen.sh | 14 +- .../scripts/setup-and-config.sh | 3 - .../config/screen-to-prompt-mapping.js | 131 ------------------ react/.github/GITHUB_ACTIONS.md | 92 ++++++------ .../scripts/process-screen.sh | 14 +- .../scripts/setup-and-config.sh | 3 - .../config/screen-to-prompt-mapping.js | 131 ------------------ 9 files changed, 67 insertions(+), 445 deletions(-) delete mode 100644 react-js/.github/config/screen-to-prompt-mapping.js delete mode 100644 react/.github/config/screen-to-prompt-mapping.js diff --git a/.github/GITHUB_ACTIONS.md b/.github/GITHUB_ACTIONS.md index dde873b4..6eab3f7c 100644 --- a/.github/GITHUB_ACTIONS.md +++ b/.github/GITHUB_ACTIONS.md @@ -28,18 +28,6 @@ default_screen_deployment_status: **💡 Pro Tip**: Setting all screens to `false` will skip the entire build and upload process, making the pipeline complete quickly without using resources. -### `config/screen-to-prompt-mapping.js` - -Maps custom screen names (directory names) to Auth0 prompt names. Example: - -```javascript -export const screenToPromptMap = { - "login-id": "login-id", // Screen 'login-id' maps to Auth0 prompt 'login-id' - "mfa-sms-challenge": "mfa-sms", // Screen 'mfa-sms-challenge' maps to 'mfa-sms' - "passkey-enrollment": "passkeys", -}; -``` - ### `config/context-configuration.js` Defines which Auth0 context data (e.g., branding settings, client info) is available to custom screens. Example: @@ -108,7 +96,6 @@ To use this deployment system in your own project: 1. Add your new screen's implementation (e.g., HTML, JS, CSS built by Vite) into a subdirectory within `src/screens/` (e.g., `src/screens/my-new-screen/`). Ensure your build process outputs these to `dist/assets/my-new-screen/`. 2. Update `config/deploy_config.yml` to include your new screen and set its deployment status (e.g., `my-new-screen: true`). -3. If your screen name doesn't directly map to an Auth0 prompt, add an entry to `config/screen-to-prompt-mapping.js`. -4. Deployment typically happens automatically on push to the configured branches (e.g., `main`) if the workflow is enabled. +3. Deployment typically happens automatically on push to the configured branches (e.g., `main`) if the workflow is enabled. For detailed deployment instructions, refer to the `DEPLOYMENT.md` document (not included in this `.github` folder example). diff --git a/react-js/.github/GITHUB_ACTIONS.md b/react-js/.github/GITHUB_ACTIONS.md index 68928c7b..4758c552 100644 --- a/react-js/.github/GITHUB_ACTIONS.md +++ b/react-js/.github/GITHUB_ACTIONS.md @@ -31,18 +31,6 @@ default_screen_deployment_status: **Tip:** If all screens are set to `false`, the workflow skips building and uploading entirely, saving time and resources. -### `config/screen-to-prompt-mapping.js` - -Maps your screen directory names to Auth0 prompt identifiers. Most screens map 1:1, but some need custom mappings: - -```javascript -export const screenToPromptMap = { - "login-id": "login-id", // Direct mapping - "mfa-sms-challenge": "mfa-sms", // Custom mapping - "passkey-enrollment": "passkeys", // Custom mapping -}; -``` - ### `config/context-configuration.js` Defines what Auth0 data your screens can access (branding, user info, etc.): @@ -57,74 +45,6 @@ export const contextConfig = [ ## GitHub Actions -### `check-deployment-targets` - -Runs first to check if any screens need deployment. This prevents wasting resources when nothing needs to be deployed. - -**Outputs:** -- `has_targets` - `true` if at least one screen is enabled -- `target_count` - Number of enabled screens -- `target_screens` - JSON array of screen names to deploy - -### `configure-auth0-screens` - -The main deployment action, organized into these scripts: - -- `action.yml` - Coordinates the overall deployment -- `scripts/utils.sh` - Helper functions for loading configs -- `scripts/setup-and-config.sh` - Validates environment and loads deployment settings -- `scripts/discover-assets.sh` - Finds and categorizes screen assets -- `scripts/process-screen.sh` - Processes individual screens and updates Auth0 -- `scripts/generate-report.sh` - Creates a deployment summary - -### `setup-auth0-cli` - -Installs and authenticates the Auth0 CLI so the workflow can update your tenant. - -### `upload-acul-to-s3` - -Uploads built assets from the `dist` directory to your S3 bucket. - -## When the Workflow Runs - -The workflow triggers when: -- Code is pushed to the `main` branch -- You manually trigger it from the GitHub Actions tab - -It will NOT run on pull requests or development branches. - -## Required Secrets - -Configure these in your GitHub repository under `Settings > Secrets and variables > Actions`: - -| Secret | Example | What It's For | -|--------|---------|---------------| -| `AWS_S3_ARN` | `arn:aws:iam::123456789012:role/GitHubActions-ACUL` | IAM role for uploading to S3 | -| `S3_BUCKET_NAME` | `my-acul-assets` | Where to store the built files | -| `AWS_REGION` | `us-east-1` | AWS region of your bucket | -| `S3_CDN_URL` | `https://d1234abcdef.cloudfront.net` | Public URL for accessing assets | -| `AUTH0_DOMAIN` | `dev-mydomain.auth0.com` | Your Auth0 domain (must have custom domain) | -| `AUTH0_CLIENT_ID` | `abc123...` | M2M app client ID | -| `AUTH0_CLIENT_SECRET` | `secret123...` | M2M app client secret | - -## Adding a New Screen - -1. Create your screen in `src/screens/my-new-screen/` -2. Build your project - the screen will appear in `dist/assets/my-new-screen/` -3. Add it to `deploy_config.yml`: - ```yaml - "my-new-screen": true - ``` -4. If needed, add a custom mapping in `screen-to-prompt-mapping.js` -5. Push to `main` - the workflow deploys automatically - -For complete setup instructions including AWS and Auth0 configuration, see `DEPLOYMENT.md`. - "user.app_metadata.[keyName]", // Replace [keyName] with actual metadata key -]; -``` - -## GitHub Actions - ### Available Actions #### `check-deployment-targets` @@ -153,15 +73,23 @@ The main action uses a modular architecture with organized bash scripts: - **`setup-auth0-cli`**: Installs and authorizes the Auth0 CLI for programmatic interaction with your Auth0 tenant. - **`upload-acul-to-s3`**: Uploads the built ACUL assets from the `dist` directory to an AWS S3 bucket. -### Usage in Your Project +## When the Workflow Runs + +The workflow triggers when: +- Code is pushed to the `main` branch +- You manually trigger it from the GitHub Actions tab + +It will NOT run on pull requests or development branches. + +## Usage in Your Project To use this deployment system in your own project: -1. Copy the entire `.github` directory to your repository root. -2. Update the workflow file (`.github/workflows/acul-deploy.yml`) to match your project structure and desired triggers. -3. Configure the required secrets in your GitHub repository (`Settings > Secrets and variables > Actions`): +1. Copy the entire `.github` directory to your repository root. +2. Update the workflow file (`.github/workflows/acul-deploy.yml`) to match your project structure and desired triggers. +3. Configure the required secrets in your GitHub repository (`Settings > Secrets and variables > Actions`): -#### Required GitHub Secrets +### Required Secrets | Secret Name | Sample Value | Description | | --------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | @@ -173,13 +101,12 @@ To use this deployment system in your own project: | `AUTH0_CLIENT_ID` | `abcdef123456789` | M2M application client ID for Auth0 Management API | | `AUTH0_CLIENT_SECRET` | `your-m2m-secret-here` | M2M application client secret | -4. Modify the configuration files in `.github/config/` as needed for your deployment requirements. +4. Modify the configuration files in `.github/config/` as needed for your deployment requirements. ## Adding New Screens -1. Add your new screen's implementation (e.g., HTML, JS, CSS built by Vite) into a subdirectory within `src/screens/` (e.g., `src/screens/my-new-screen/`). Ensure your build process outputs these to `dist/assets/my-new-screen/`. -2. Update `config/deploy_config.yml` to include your new screen and set its deployment status (e.g., `my-new-screen: true`). -3. If your screen name doesn't directly map to an Auth0 prompt, add an entry to `config/screen-to-prompt-mapping.js`. -4. Deployment typically happens automatically on push to the configured branches (e.g., `main`) if the workflow is enabled. +1. Add your new screen's implementation into a subdirectory within `src/screens/` (e.g., `src/screens/my-new-screen/`). Ensure your build process outputs these to `dist/assets/my-new-screen/`. +2. Update `config/deploy_config.yml` to include your new screen and set its deployment status (e.g., `my-new-screen: true`). +3. Deployment typically happens automatically on push to the configured branches (e.g., `main`) if the workflow is enabled. -For detailed deployment instructions, refer to the `DEPLOYMENT.md` document (not included in this `.github` folder example). +For detailed deployment instructions, refer to `DEPLOYMENT.md`. diff --git a/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh b/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh index e4b2b1c9..732b5230 100755 --- a/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh +++ b/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh @@ -7,15 +7,7 @@ set -euo pipefail SCREEN_NAME="$1" -# Look up the prompt name for this screen -PROMPT_NAME=$(echo "$SCREEN_TO_PROMPT_MAP" | jq -r --arg screen "$SCREEN_NAME" '.[$screen] // $screen') - -if [ "$PROMPT_NAME" == "null" ] || [ -z "$PROMPT_NAME" ]; then - echo "::warning::No prompt mapping found for screen '$SCREEN_NAME', using screen name as prompt" - PROMPT_NAME="$SCREEN_NAME" -fi - -echo "Processing $SCREEN_NAME → $PROMPT_NAME" +echo "Processing $SCREEN_NAME" # Discover assets using dedicated script source ".github/actions/configure-auth0-screens/scripts/discover-assets.sh" "$SCREEN_NAME" @@ -103,7 +95,7 @@ fi AUTH0_OUTPUT="" AUTH0_EXIT_CODE=0 set +e -AUTH0_OUTPUT=$(auth0 ul customize --rendering-mode advanced --prompt "$PROMPT_NAME" --screen "$SCREEN_NAME" --settings-file "$SETTINGS_FILE" 2>&1) +AUTH0_OUTPUT=$(auth0 acul config set "$SCREEN_NAME" --settings-file "$SETTINGS_FILE" 2>&1) AUTH0_EXIT_CODE=$? set -e @@ -112,7 +104,7 @@ if [ $AUTH0_EXIT_CODE -eq 0 ]; then rm -f "$SETTINGS_FILE"; trap - ERR exit 0 else - echo "::error::Failed to configure $PROMPT_NAME for screen $SCREEN_NAME (Exit Code: $AUTH0_EXIT_CODE)" + echo "::error::Failed to configure screen $SCREEN_NAME (Exit Code: $AUTH0_EXIT_CODE)" echo "$AUTH0_OUTPUT" rm -f "$SETTINGS_FILE"; trap - ERR exit 1 diff --git a/react-js/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh b/react-js/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh index 8bb1dcef..7981b7d9 100755 --- a/react-js/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh +++ b/react-js/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh @@ -10,9 +10,6 @@ source ".github/actions/configure-auth0-screens/scripts/utils.sh" # LOAD CONFIGURATIONS ############################################# -SCREEN_TO_PROMPT_MAP=$(load_js_module ".github/config/screen-to-prompt-mapping.js" "screenToPromptMap") -export SCREEN_TO_PROMPT_MAP - CONTEXT_CONFIG=$(load_js_module ".github/config/context-configuration.js" "contextConfig") export CONTEXT_CONFIG diff --git a/react-js/.github/config/screen-to-prompt-mapping.js b/react-js/.github/config/screen-to-prompt-mapping.js deleted file mode 100644 index 7412d138..00000000 --- a/react-js/.github/config/screen-to-prompt-mapping.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Maps Auth0 ACUL screen names to their corresponding Universal Login prompt names. - * Used by GitHub Actions to determine which Auth0 prompt to configure for each screen. - */ - -export const screenToPromptMap = { - // Email & Phone Identifiers - "email-identifier-challenge": "email-identifier-challenge", - "phone-identifier-challenge": "phone-identifier-challenge", - "phone-identifier-enrollment": "phone-identifier-enrollment", - - // Captcha - "interstitial-captcha": "captcha", - - // Login - "login-id": "login-id", - "login-password": "login-password", - login: "login", - "login-passwordless-email-code": "login-passwordless", - "login-passwordless-sms-otp": "login-passwordless", - - // Passkeys - "passkey-enrollment": "passkeys", - "passkey-enrollment-local": "passkeys", - - // Signup - "signup-id": "signup-id", - "signup-password": "signup-password", - signup: "signup", - - // Password Reset - "reset-password": "reset-password", - "reset-password-email": "reset-password", - "reset-password-error": "reset-password", - "reset-password-request": "reset-password", - "reset-password-success": "reset-password", - - // MFA Base - "mfa-begin-enroll-options": "mfa", - "mfa-detect-browser-capabilities": "mfa", - "mfa-enroll-result": "mfa", - "mfa-login-options": "mfa", - - // MFA SMS - "mfa-country-codes": "mfa-sms", - "mfa-sms-challenge": "mfa-sms", - "mfa-sms-enrollment": "mfa-sms", - "mfa-sms-list": "mfa-sms", - - // MFA Email - "mfa-email-challenge": "mfa-email", - "mfa-email-list": "mfa-email", - - // MFA Push - "mfa-push-challenge-push": "mfa-push", - "mfa-push-enrollment-qr": "mfa-push", - "mfa-push-list": "mfa-push", - "mfa-push-welcome": "mfa-push", - - // MFA OTP - "mfa-otp-challenge": "mfa-otp", - "mfa-otp-enrollment-code": "mfa-otp", - "mfa-otp-enrollment-qr": "mfa-otp", - - // MFA Phone & Voice - "mfa-phone-challenge": "mfa-phone", - "mfa-phone-enrollment": "mfa-phone", - "mfa-voice-challenge": "mfa-voice", - "mfa-voice-enrollment": "mfa-voice", - - // MFA Recovery Code - "mfa-recovery-code-challenge": "mfa-recovery-code", - "mfa-recovery-code-enrollment": "mfa-recovery-code", - "mfa-recovery-code-challenge-new-code": "mfa-recovery-code", - - // MFA WebAuthn - "mfa-webauthn-change-key-nickname": "mfa-webauthn", - "mfa-webauthn-enrollment-success": "mfa-webauthn", - "mfa-webauthn-error": "mfa-webauthn", - "mfa-webauthn-not-available-error": "mfa-webauthn", - "mfa-webauthn-platform-challenge": "mfa-webauthn", - "mfa-webauthn-platform-enrollment": "mfa-webauthn", - "mfa-webauthn-roaming-challenge": "mfa-webauthn", - "mfa-webauthn-roaming-enrollment": "mfa-webauthn", - - // Reset Password with MFA - "reset-password-mfa-email-challenge": "reset-password", - "reset-password-mfa-otp-challenge": "reset-password", - "reset-password-mfa-push-challenge-push": "reset-password", - "reset-password-mfa-sms-challenge": "reset-password", - "reset-password-mfa-phone-challenge": "reset-password", - "reset-password-mfa-voice-challenge": "reset-password", - "reset-password-mfa-recovery-code-challenge": "reset-password", - "reset-password-mfa-webauthn-platform-challenge": "reset-password", - "reset-password-mfa-webauthn-roaming-challenge": "reset-password", - - // Organizations - "organization-picker": "organizations", - "organization-selection": "organizations", - - // Device Flow - "device-code-activation": "device-flow", - "device-code-activation-allowed": "device-flow", - "device-code-activation-denied": "device-flow", - "device-code-confirmation": "device-flow", - - // Invitations & Consent - "accept-invitation": "invitation", - consent: "consent", - "customized-consent": "customized-consent", - - // Email Verification - "email-otp-challenge": "email-otp-challenge", - "email-verification-result": "email-verification", - "login-email-verification": "login-email-verification", - - // Logout - logout: "logout", - "logout-aborted": "logout", - "logout-complete": "logout", - - // Brute Force Protection - "brute-force-protection-unblock": "brute-force-protection", - "brute-force-protection-unblock-failure": "brute-force-protection", - "brute-force-protection-unblock-success": "brute-force-protection", - - // Common - "redeem-ticket": "common", -}; - -export default screenToPromptMap; diff --git a/react/.github/GITHUB_ACTIONS.md b/react/.github/GITHUB_ACTIONS.md index 6c4d9f37..41be199b 100644 --- a/react/.github/GITHUB_ACTIONS.md +++ b/react/.github/GITHUB_ACTIONS.md @@ -32,17 +32,6 @@ default_screen_deployment_status: **Tip:** If all screens are set to `false`, the workflow skips building and uploading entirely, saving time and resources. -### `config/screen-to-prompt-mapping.js` -Maps your screen directory names to Auth0 prompt identifiers. - -```javascript -export const screenToPromptMap = { - "login-id": "login-id", - "mfa-sms-challenge": "mfa-sms", - "passkey-enrollment": "passkeys", -}; -``` - ### `config/context-configuration.js` Defines what Auth0 data your screens can access (branding, user info, etc.): @@ -57,33 +46,33 @@ export const contextConfig = [ ## GitHub Actions -### `check-deployment-targets` +### Available Actions -Runs first to check if any screens need deployment. This prevents wasting resources when nothing needs to be deployed. +#### `check-deployment-targets` -**Outputs:** -- `has_targets` - `true` if at least one screen is enabled -- `target_count` - Number of enabled screens -- `target_screens` - JSON array of screen names to deploy +Determines early in the pipeline if any screens are targeted for deployment, enabling conditional execution of expensive operations. -### `configure-auth0-screens` +**Outputs**: -The main deployment action, organized into these scripts: +- `has_targets`: Boolean indicating if any screens need deployment +- `target_count`: Number of screens targeted +- `target_screens`: JSON array of targeted screen names -- `action.yml` - Coordinates the overall deployment -- `scripts/utils.sh` - Helper functions for loading configs -- `scripts/setup-and-config.sh` - Validates environment and loads deployment settings -- `scripts/discover-assets.sh` - Finds and categorizes screen assets -- `scripts/process-screen.sh` - Processes individual screens and updates Auth0 -- `scripts/generate-report.sh` - Creates a deployment summary +#### `configure-auth0-screens` -### `setup-auth0-cli` +The main action uses a modular architecture with organized bash scripts: -Installs and authenticates the Auth0 CLI so the workflow can update your tenant. +- **`action.yml`**: Orchestrator that coordinates the deployment flow +- **`scripts/utils.sh`**: Shared utilities for loading JS modules and checking screen targeting +- **`scripts/setup-and-config.sh`**: Loads configurations, validates environment, reads deployment config +- **`scripts/discover-assets.sh`**: Dedicated asset discovery and categorization for screens +- **`scripts/process-screen.sh`**: Handles single screen processing including settings generation and Auth0 CLI integration +- **`scripts/generate-report.sh`**: Creates deployment summary table and final status reporting -### `upload-acul-to-s3` +#### Other Actions -Uploads built assets from the `dist` directory to your S3 bucket. +- **`setup-auth0-cli`**: Installs and authorizes the Auth0 CLI for programmatic interaction with your Auth0 tenant. +- **`upload-acul-to-s3`**: Uploads the built ACUL assets from the `dist` directory to an AWS S3 bucket. ## When the Workflow Runs @@ -93,29 +82,32 @@ The workflow triggers when: It will NOT run on pull requests or development branches. -## Required Secrets +## Usage in Your Project + +To use this deployment system in your own project: + +1. Copy the entire `.github` directory to your repository root. +2. Update the workflow file (`.github/workflows/acul-deploy.yml`) to match your project structure and desired triggers. +3. Configure the required secrets in your GitHub repository (`Settings > Secrets and variables > Actions`): + +### Required Secrets -Configure these in your GitHub repository under `Settings > Secrets and variables > Actions`: +| Secret Name | Sample Value | Description | +| --------------------- | -------------------------------------------------------------- | ------------------------------------------------------ | +| `AWS_S3_ARN` | `arn:aws:iam::123456789012:role/GitHubActions-ACUL-Deployment` | ARN of IAM role for GitHub Actions OIDC with S3 access | +| `S3_BUCKET_NAME` | `my-acul-assets-bucket` | Your S3 bucket name for hosting assets | +| `AWS_REGION` | `us-east-1` | AWS region where your S3 bucket is located | +| `S3_CDN_URL` | `https://d1234abcdef.cloudfront.net` | CloudFront or S3 public URL (no trailing slash) | +| `AUTH0_DOMAIN` | `dev-mydomain.auth0.com` | Your Auth0 domain (must have custom domain set up) | +| `AUTH0_CLIENT_ID` | `abcdef123456789` | M2M application client ID for Auth0 Management API | +| `AUTH0_CLIENT_SECRET` | `your-m2m-secret-here` | M2M application client secret | -| Secret | Example | What It's For | -|--------|---------|---------------| -| `AWS_S3_ARN` | `arn:aws:iam::123456789012:role/GitHubActions-ACUL` | IAM role for uploading to S3 | -| `S3_BUCKET_NAME` | `my-acul-assets` | Where to store the built files | -| `AWS_REGION` | `us-east-1` | AWS region of your bucket | -| `S3_CDN_URL` | `https://d1234abcdef.cloudfront.net` | Public URL for accessing assets | -| `AUTH0_DOMAIN` | `dev-mydomain.auth0.com` | Your Auth0 domain (must have custom domain) | -| `AUTH0_CLIENT_ID` | `abc123...` | M2M app client ID | -| `AUTH0_CLIENT_SECRET` | `secret123...` | M2M app client secret | +4. Modify the configuration files in `.github/config/` as needed for your deployment requirements. -## Adding a New Screen +## Adding New Screens -1. Create your screen in `src/screens/my-new-screen/` -2. Build your project - the screen will appear in `dist/assets/my-new-screen/` -3. Add it to `deploy_config.yml`: - ```yaml - "my-new-screen": true - ``` -4. If needed, add a custom mapping in `screen-to-prompt-mapping.js` -5. Push to `main` - the workflow deploys automatically +1. Add your new screen's implementation into a subdirectory within `src/screens/` (e.g., `src/screens/my-new-screen/`). Ensure your build process outputs these to `dist/assets/my-new-screen/`. +2. Update `config/deploy_config.yml` to include your new screen and set its deployment status (e.g., `my-new-screen: true`). +3. Deployment typically happens automatically on push to the configured branches (e.g., `main`) if the workflow is enabled. -For complete setup instructions including AWS and Auth0 configuration, see `DEPLOYMENT.md`. +For detailed deployment instructions, refer to `DEPLOYMENT.md`. diff --git a/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh b/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh index e4b2b1c9..732b5230 100755 --- a/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh +++ b/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh @@ -7,15 +7,7 @@ set -euo pipefail SCREEN_NAME="$1" -# Look up the prompt name for this screen -PROMPT_NAME=$(echo "$SCREEN_TO_PROMPT_MAP" | jq -r --arg screen "$SCREEN_NAME" '.[$screen] // $screen') - -if [ "$PROMPT_NAME" == "null" ] || [ -z "$PROMPT_NAME" ]; then - echo "::warning::No prompt mapping found for screen '$SCREEN_NAME', using screen name as prompt" - PROMPT_NAME="$SCREEN_NAME" -fi - -echo "Processing $SCREEN_NAME → $PROMPT_NAME" +echo "Processing $SCREEN_NAME" # Discover assets using dedicated script source ".github/actions/configure-auth0-screens/scripts/discover-assets.sh" "$SCREEN_NAME" @@ -103,7 +95,7 @@ fi AUTH0_OUTPUT="" AUTH0_EXIT_CODE=0 set +e -AUTH0_OUTPUT=$(auth0 ul customize --rendering-mode advanced --prompt "$PROMPT_NAME" --screen "$SCREEN_NAME" --settings-file "$SETTINGS_FILE" 2>&1) +AUTH0_OUTPUT=$(auth0 acul config set "$SCREEN_NAME" --settings-file "$SETTINGS_FILE" 2>&1) AUTH0_EXIT_CODE=$? set -e @@ -112,7 +104,7 @@ if [ $AUTH0_EXIT_CODE -eq 0 ]; then rm -f "$SETTINGS_FILE"; trap - ERR exit 0 else - echo "::error::Failed to configure $PROMPT_NAME for screen $SCREEN_NAME (Exit Code: $AUTH0_EXIT_CODE)" + echo "::error::Failed to configure screen $SCREEN_NAME (Exit Code: $AUTH0_EXIT_CODE)" echo "$AUTH0_OUTPUT" rm -f "$SETTINGS_FILE"; trap - ERR exit 1 diff --git a/react/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh b/react/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh index 8bb1dcef..7981b7d9 100755 --- a/react/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh +++ b/react/.github/actions/configure-auth0-screens/scripts/setup-and-config.sh @@ -10,9 +10,6 @@ source ".github/actions/configure-auth0-screens/scripts/utils.sh" # LOAD CONFIGURATIONS ############################################# -SCREEN_TO_PROMPT_MAP=$(load_js_module ".github/config/screen-to-prompt-mapping.js" "screenToPromptMap") -export SCREEN_TO_PROMPT_MAP - CONTEXT_CONFIG=$(load_js_module ".github/config/context-configuration.js" "contextConfig") export CONTEXT_CONFIG diff --git a/react/.github/config/screen-to-prompt-mapping.js b/react/.github/config/screen-to-prompt-mapping.js deleted file mode 100644 index 7412d138..00000000 --- a/react/.github/config/screen-to-prompt-mapping.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Maps Auth0 ACUL screen names to their corresponding Universal Login prompt names. - * Used by GitHub Actions to determine which Auth0 prompt to configure for each screen. - */ - -export const screenToPromptMap = { - // Email & Phone Identifiers - "email-identifier-challenge": "email-identifier-challenge", - "phone-identifier-challenge": "phone-identifier-challenge", - "phone-identifier-enrollment": "phone-identifier-enrollment", - - // Captcha - "interstitial-captcha": "captcha", - - // Login - "login-id": "login-id", - "login-password": "login-password", - login: "login", - "login-passwordless-email-code": "login-passwordless", - "login-passwordless-sms-otp": "login-passwordless", - - // Passkeys - "passkey-enrollment": "passkeys", - "passkey-enrollment-local": "passkeys", - - // Signup - "signup-id": "signup-id", - "signup-password": "signup-password", - signup: "signup", - - // Password Reset - "reset-password": "reset-password", - "reset-password-email": "reset-password", - "reset-password-error": "reset-password", - "reset-password-request": "reset-password", - "reset-password-success": "reset-password", - - // MFA Base - "mfa-begin-enroll-options": "mfa", - "mfa-detect-browser-capabilities": "mfa", - "mfa-enroll-result": "mfa", - "mfa-login-options": "mfa", - - // MFA SMS - "mfa-country-codes": "mfa-sms", - "mfa-sms-challenge": "mfa-sms", - "mfa-sms-enrollment": "mfa-sms", - "mfa-sms-list": "mfa-sms", - - // MFA Email - "mfa-email-challenge": "mfa-email", - "mfa-email-list": "mfa-email", - - // MFA Push - "mfa-push-challenge-push": "mfa-push", - "mfa-push-enrollment-qr": "mfa-push", - "mfa-push-list": "mfa-push", - "mfa-push-welcome": "mfa-push", - - // MFA OTP - "mfa-otp-challenge": "mfa-otp", - "mfa-otp-enrollment-code": "mfa-otp", - "mfa-otp-enrollment-qr": "mfa-otp", - - // MFA Phone & Voice - "mfa-phone-challenge": "mfa-phone", - "mfa-phone-enrollment": "mfa-phone", - "mfa-voice-challenge": "mfa-voice", - "mfa-voice-enrollment": "mfa-voice", - - // MFA Recovery Code - "mfa-recovery-code-challenge": "mfa-recovery-code", - "mfa-recovery-code-enrollment": "mfa-recovery-code", - "mfa-recovery-code-challenge-new-code": "mfa-recovery-code", - - // MFA WebAuthn - "mfa-webauthn-change-key-nickname": "mfa-webauthn", - "mfa-webauthn-enrollment-success": "mfa-webauthn", - "mfa-webauthn-error": "mfa-webauthn", - "mfa-webauthn-not-available-error": "mfa-webauthn", - "mfa-webauthn-platform-challenge": "mfa-webauthn", - "mfa-webauthn-platform-enrollment": "mfa-webauthn", - "mfa-webauthn-roaming-challenge": "mfa-webauthn", - "mfa-webauthn-roaming-enrollment": "mfa-webauthn", - - // Reset Password with MFA - "reset-password-mfa-email-challenge": "reset-password", - "reset-password-mfa-otp-challenge": "reset-password", - "reset-password-mfa-push-challenge-push": "reset-password", - "reset-password-mfa-sms-challenge": "reset-password", - "reset-password-mfa-phone-challenge": "reset-password", - "reset-password-mfa-voice-challenge": "reset-password", - "reset-password-mfa-recovery-code-challenge": "reset-password", - "reset-password-mfa-webauthn-platform-challenge": "reset-password", - "reset-password-mfa-webauthn-roaming-challenge": "reset-password", - - // Organizations - "organization-picker": "organizations", - "organization-selection": "organizations", - - // Device Flow - "device-code-activation": "device-flow", - "device-code-activation-allowed": "device-flow", - "device-code-activation-denied": "device-flow", - "device-code-confirmation": "device-flow", - - // Invitations & Consent - "accept-invitation": "invitation", - consent: "consent", - "customized-consent": "customized-consent", - - // Email Verification - "email-otp-challenge": "email-otp-challenge", - "email-verification-result": "email-verification", - "login-email-verification": "login-email-verification", - - // Logout - logout: "logout", - "logout-aborted": "logout", - "logout-complete": "logout", - - // Brute Force Protection - "brute-force-protection-unblock": "brute-force-protection", - "brute-force-protection-unblock-failure": "brute-force-protection", - "brute-force-protection-unblock-success": "brute-force-protection", - - // Common - "redeem-ticket": "common", -}; - -export default screenToPromptMap; From ef3340817d1ba7126d79896cc988e56a6aec13cb Mon Sep 17 00:00:00 2001 From: ramya18101 Date: Tue, 30 Jun 2026 23:40:12 +0530 Subject: [PATCH 2/2] fix:update deprecated command option in auth0 configuration --- README.md | 2 +- .../actions/configure-auth0-screens/scripts/process-screen.sh | 2 +- .../actions/configure-auth0-screens/scripts/process-screen.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d003cf83..7b5a2663 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ npm install -g @auth0/auth0-cli auth0 login # Configure ACUL with settings file -auth0 ul customize --rendering-mode advanced --prompt login-id --screen login-id --settings-file ./settings.json +auth0 ul customize --rendering-mode advanced --prompt login-id --screen login-id --file ./settings.json ``` **About settings.json:** This file contains the same ACUL payload configuration as shown in the [Build Structure](#build-structure) section. It defines how Auth0 should load your custom screen assets, including CSS files, JavaScript bundles, and context configuration. The settings.json file structure is identical to the payload you'd use when configuring ACUL programmatically. diff --git a/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh b/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh index 732b5230..43572ef7 100755 --- a/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh +++ b/react-js/.github/actions/configure-auth0-screens/scripts/process-screen.sh @@ -95,7 +95,7 @@ fi AUTH0_OUTPUT="" AUTH0_EXIT_CODE=0 set +e -AUTH0_OUTPUT=$(auth0 acul config set "$SCREEN_NAME" --settings-file "$SETTINGS_FILE" 2>&1) +AUTH0_OUTPUT=$(auth0 acul config set "$SCREEN_NAME" --file "$SETTINGS_FILE" 2>&1) AUTH0_EXIT_CODE=$? set -e diff --git a/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh b/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh index 732b5230..43572ef7 100755 --- a/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh +++ b/react/.github/actions/configure-auth0-screens/scripts/process-screen.sh @@ -95,7 +95,7 @@ fi AUTH0_OUTPUT="" AUTH0_EXIT_CODE=0 set +e -AUTH0_OUTPUT=$(auth0 acul config set "$SCREEN_NAME" --settings-file "$SETTINGS_FILE" 2>&1) +AUTH0_OUTPUT=$(auth0 acul config set "$SCREEN_NAME" --file "$SETTINGS_FILE" 2>&1) AUTH0_EXIT_CODE=$? set -e