Skip to content

Commit

Permalink
chore: Update test_client.sh to use OIDC_CLIENT_ID from .env file
Browse files Browse the repository at this point in the history
Signed-off-by: Ilayda Cansin Koc <ilaydacansin@gmail.com>
  • Loading branch information
ilaydacansinkoc committed Jun 11, 2024
1 parent df7e7e7 commit 293318d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions test_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,10 @@ client=$(docker run --rm -it \
--scope openid \
--redirect-uri "http://localhost:3000/api/auth/callback/oidc" \
-e http://hydra:4445 \
--token-endpoint-auth-method client_secret_post \
--format json )

echo $client

client_id=$(echo $client | jq -r '.client_id')


env_file="./vclogin/.env"

if grep -q "OIDC_CLIENT_ID=" "$env_file"; then
sed -i "s/^OIDC_CLIENT_ID=.*/OIDC_CLIENT_ID=$client_id/" "$env_file"
else
echo "OIDC_CLIENT_ID=$client_id" >> "$env_file"
fi

docker run --rm -it \
--network ory-hydra-net \
-p 9010:9010 \
Expand Down

0 comments on commit 293318d

Please sign in to comment.