Skip to content

Commit

Permalink
fix: fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
swh00tw committed Mar 11, 2024
1 parent 89cf0cb commit c21ce5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libs/recnet-jwt/scripts/genRS256KeyPair.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key -N ""
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub

# find the current directory of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "DIR: $DIR"

# put them in .env file
echo "PRIVATE_KEY='$(cat jwtRS256.key)'" > ../.env.local
echo "PUBLIC_KEY='$(cat jwtRS256.key.pub)'" >> ../.env.local
echo "PRIVATE_KEY='$(cat jwtRS256.key)'" > .env.local
echo "PUBLIC_KEY='$(cat jwtRS256.key.pub)'" >> .env.local

echo "Generated jwtRS256.key and jwtRS256.key.pub and put them in .env.local file."
# clean up
Expand Down

0 comments on commit c21ce5d

Please sign in to comment.