Skip to content

Commit

Permalink
Merge pull request #87 from P4-Games/feature/68_jwt_secret
Browse files Browse the repository at this point in the history
merge feature/68-jwt-secret into develop
  • Loading branch information
dappsar authored Sep 17, 2024
2 parents 2666c2b + a612e4f commit 377b383
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ARG NODE_PROVIDER_MUMBAI_URL
ARG NODE_PROVIDER_SCROLL_URL
ARG HANDLE_VERCEL_FREE_PLAN_TIMEOUT
ARG API3_ENABLED
ARG JWT_SECRET
ARG NEXT_PUBLIC_FROM_ICP
ARG NEXT_PUBLIC_USE_MOCK
ARG NEXT_PUBLIC_UI_URL
Expand All @@ -39,6 +40,7 @@ ENV NODE_PROVIDER_MUMBAI_URL $NODE_PROVIDER_MUMBAI_URL
ENV NODE_PROVIDER_SCROLL_URL $NODE_PROVIDER_SCROLL_URL
ENV HANDLE_VERCEL_FREE_PLAN_TIMEOUT $HANDLE_VERCEL_FREE_PLAN_TIMEOUT
ENV API3_ENABLED $API3_ENABLED
ENV JWT_SECRET $JWT_SECRET
ENV NEXT_PUBLIC_FROM_ICP $NEXT_PUBLIC_FROM_ICP
ENV NEXT_PUBLIC_USE_MOCK $NEXT_PUBLIC_USE_MOCK
ENV NEXT_PUBLIC_UI_URL $NEXT_PUBLIC_UI_URL
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ NODE_PROVIDER_MUMBAI_URL='https://stylish-dawn-bush.bsc-testnet.quiknode.pro/YOU
NODE_PROVIDER_SCROLL_URL='https://lb.drpc.org/ogrpc?network=scroll-sepolia&dkey=YOUR_API_KEY'
HANDLE_VERCEL_FREE_PLAN_TIMEOUT=true
API3_ENABLED=false
JWT_SECRET='some secret text'

# client side
NEXT_PUBLIC_USE_MOCK=true
Expand Down
2 changes: 2 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ steps:
- HANDLE_VERCEL_FREE_PLAN_TIMEOUT=${_HANDLE_VERCEL_FREE_PLAN_TIMEOUT}
- NEXT_PUBLIC_USE_MOCK=${_NEXT_PUBLIC_USE_MOCK}
- API3_ENABLED=${_API3_ENABLED}
- JWT_SECRET=${_JWT_SECRET}
- NEXT_PUBLIC_FROM_ICP=${_NEXT_PUBLIC_FROM_ICP}
- NEXT_PUBLIC_UI_URL=${_NEXT_PUBLIC_UI_URL}
- NEXT_PUBLIC_ALLOWED_ORIGINS=${_NEXT_PUBLIC_ALLOWED_ORIGINS}
Expand All @@ -47,6 +48,7 @@ steps:
"--build-arg", "HANDLE_VERCEL_FREE_PLAN_TIMEOUT=${_HANDLE_VERCEL_FREE_PLAN_TIMEOUT}",
"--build-arg", "NEXT_PUBLIC_USE_MOCK=${_NEXT_PUBLIC_USE_MOCK}",
"--build-arg", "API3_ENABLED=${_API3_ENABLED}",
"--build-arg", "JWT_SECRET=${_JWT_SECRET}",
"--build-arg", "NEXT_PUBLIC_FROM_ICP=${_NEXT_PUBLIC_FROM_ICP}",
"--build-arg", "NEXT_PUBLIC_UI_URL=${_NEXT_PUBLIC_UI_URL}",
"--build-arg", "NEXT_PUBLIC_ALLOWED_ORIGINS=${_NEXT_PUBLIC_ALLOWED_ORIGINS}",
Expand Down
1 change: 1 addition & 0 deletions example_env
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ NODE_PROVIDER_MUMBAI_URL='https://stylish-dawn-bush.bsc-testnet.quiknode.pro/YOU
NODE_PROVIDER_SCROLL_URL='https://lb.drpc.org/ogrpc?network=scroll-sepolia&dkey=YOUR_API_KEY'
HANDLE_VERCEL_FREE_PLAN_TIMEOUT=true
API3_ENABLED=false
JWT_SECRET={some secret text}
NEXT_PUBLIC_FROM_ICP=true

# client-side
Expand Down
1 change: 1 addition & 0 deletions scripts/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ docker build \
--build-arg NODE_PROVIDER_MUMBAI_URL="$NODE_PROVIDER_MUMBAI_URL" \
--build-arg NODE_PROVIDER_SCROLL_URL="$NODE_PROVIDER_SCROLL_URL" \
--build-arg API3_ENABLED="$API3_ENABLED" \
--build-arg JWT_SECRET="$JWT_SECRET" \
--build-arg NEXT_PUBLIC_FROM_ICP="$NEXT_PUBLIC_FROM_ICP" \
--build-arg NEXT_PUBLIC_USE_MOCK="$NEXT_PUBLIC_USE_MOCK" \
--build-arg NEXT_PUBLIC_UI_URL="$NEXT_PUBLIC_UI_URL" \
Expand Down
2 changes: 1 addition & 1 deletion src/config-global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const NFT_SHARE = 'https://api.whatsapp.com/send/?text=MESSAGE'

export const STORAGE_KEY_TOKEN = 'accessToken'
export const STORAGE_KEY_SETTINGS = 'settings'
export const JWT_SECRET = '65OcvHlcxqkBhniJBRtSc1HkzgjoKt2GmL2vV3COdw1BbKPs2etUxnVlynJUT1I'
export const JWT_SECRET = process.env.JWT_SECRET || 'some_secr3t'
export const API3_ENABLED = (process.env.API3_ENABLED || 'false') === 'true'
export const GET_BALANCES_FROM_BACKEND = true

Expand Down

0 comments on commit 377b383

Please sign in to comment.