Skip to content

Commit

Permalink
Update deploy scripts to set REACT_APP_AUTH_TYPE in .env
Browse files Browse the repository at this point in the history
  • Loading branch information
gitri-ms committed Aug 7, 2023
1 parent f644b37 commit fe1e093
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/deploy-webapp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ $PSDefaultParameterValues['Out-File:Encoding'] = 'ascii'
$envFilePath = "$PSScriptRoot/../webapp/.env"
Write-Host "Writing environment variables to '$envFilePath'..."
"REACT_APP_BACKEND_URI=https://$webapiUrl/" | Out-File -FilePath $envFilePath
"REACT_APP_AUTH_TYPE=AzureAd" | Out-File -FilePath $envFilePath -Append
"REACT_APP_AAD_AUTHORITY=$Authority" | Out-File -FilePath $envFilePath -Append
"REACT_APP_AAD_CLIENT_ID=$ApplicationClientId" | Out-File -FilePath $envFilePath -Append
"REACT_APP_AAD_API_SCOPE=api://$webapiClientId/$webapiScope" | Out-File -FilePath $envFilePath -Append
Expand Down
1 change: 1 addition & 0 deletions deploy/deploy-webapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ echo "WEB_API_SCOPE: $WEB_API_SCOPE"
ENV_FILE_PATH="$SCRIPT_ROOT/../webapp/.env"
echo "Writing environment variables to '$ENV_FILE_PATH'..."
echo "REACT_APP_BACKEND_URI=https://$WEB_API_URL/" > $ENV_FILE_PATH
echo "REACT_APP_AUTH_TYPE=AzureAd" >> $ENV_FILE_PATH
echo "REACT_APP_AAD_AUTHORITY=$AUTHORITY" >> $ENV_FILE_PATH
echo "REACT_APP_AAD_CLIENT_ID=$APPLICATION_ID" >> $ENV_FILE_PATH
echo "REACT_APP_AAD_API_SCOPE=api://$WEB_API_CLIENT_ID/$WEB_API_SCOPE" >> $ENV_FILE_PATH
Expand Down

0 comments on commit fe1e093

Please sign in to comment.