Skip to content

Commit

Permalink
Merge pull request #52 from auth0-training/feat/AUTH0_KEYWORD_REPLACE…
Browse files Browse the repository at this point in the history
…_MAPPINGS

Add GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
  • Loading branch information
jesposito authored Aug 18, 2023
2 parents b2179ef + 678816f commit 0a8516f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
### Added
- Implemented `auth0.lab.postConfigureCommand` command
- Support for writing more than one app config to a single `.env` without overwriting values
- Added runtime-specific replacement values for tenant configuration from yaml: `CODESPACE_NAME` (same as defined [here]( https://docs.github.com/en/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace)) and `AUTH0_DOMAIN` (your tenant domain).
- Added environment-specific replacement values for tenant configuration from yaml: `CODESPACE_NAME` (same as defined [here]( https://docs.github.com/en/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace)) and `AUTH0_DOMAIN` (your tenant domain).

## [1.4.4] - 2023-05-31
### Changed
- Auth0 Training logo (branding)

## [1.4.5] - 2023-08-18
### Added
- Added environment-specific replacement value for tenant configuration from yaml: `GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN` (same as defined [here]( https://docs.github.com/en/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace)
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ In addition to the visual features listed below, the Labs extension also contrib
- `AUTH0_DOMAIN`: Your Auth0 domain URI
- `AUTH0_TOKEN`: The access token issued to your client from the authorization server.

### Auth0 Deploy CLI Keyword Replacement
This extension uses the Auth0 Deploy CLI, which makes it possible to leverage environment-specific [keyword replacement](https://auth0.com/docs/deploy-monitor/deploy-cli-tool/keyword-replacement) in resource files (e.g., yml and json). These are the current keywords supported:
- `CODESPACE_NAME`: Returns the domain of the GitHub Codespaces forwarded port. For example, `app.github.dev` (when using a Codespaces environment)
- `GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN`: Returns the name of the GitHub Codespace (when using a Codespaces environment)
- `AUTH0_DOMAIN`: Your Auth0 domain URI

### Authenticating

The first thing to do is connect to your Auth0 account.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-labs",
"preview": true,
"displayName": "Auth0 Labs",
"version": "1.4.4",
"version": "1.4.5",
"description": "A Visual Studio Code extension for training lab automation and quick access to tenant information.",
"main": "./dist/extension.js",
"publisher": "auth0",
Expand Down
3 changes: 2 additions & 1 deletion src/features/deploy/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export class DeployCommands {
AUTH0_ALLOW_DELETE: false,
AUTH0_KEYWORD_REPLACE_MAPPINGS: {
AUTH0_DOMAIN: getDomainFromToken(accessToken),
CODESPACE_NAME: process.env.CODESPACE_NAME
CODESPACE_NAME: process.env.CODESPACE_NAME,
GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN: process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
}
}),
};
Expand Down

0 comments on commit 0a8516f

Please sign in to comment.