mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 22:21:23 +02:00
refactor: restructure
monorepo with apps/ and services/ directories
This commit is contained in:
parent
25824ed0ac
commit
ff80aeec1f
4062 changed files with 2592 additions and 1278 deletions
25
services/mana-core-auth/scripts/generate-keys.sh
Executable file
25
services/mana-core-auth/scripts/generate-keys.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Generate RS256 key pair for JWT signing
|
||||
|
||||
echo "Generating RS256 key pair..."
|
||||
|
||||
# Generate private key
|
||||
openssl genrsa -out private.pem 2048
|
||||
|
||||
# Generate public key from private key
|
||||
openssl rsa -in private.pem -pubout -out public.pem
|
||||
|
||||
echo ""
|
||||
echo "Keys generated successfully!"
|
||||
echo ""
|
||||
echo "Private key: private.pem"
|
||||
echo "Public key: public.pem"
|
||||
echo ""
|
||||
echo "Add these to your .env file:"
|
||||
echo ""
|
||||
echo "JWT_PRIVATE_KEY=\"$(awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' private.pem)\""
|
||||
echo ""
|
||||
echo "JWT_PUBLIC_KEY=\"$(awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' public.pem)\""
|
||||
echo ""
|
||||
echo "IMPORTANT: Keep private.pem secure and never commit it to version control!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue