From 032e103c289744124e47991da53c64e18584f858 Mon Sep 17 00:00:00 2001 From: cebgcontract <99630598+cebgcontract@users.noreply.github.com> Date: Fri, 2 Dec 2022 12:59:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=AD=A3=E5=BC=8F=E7=89=88?= =?UTF-8?q?=E7=9A=84apple=20bundle=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 3 ++- boundle.sh | 5 +++++ src/controllers/apple.controller.ts | 6 ++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.env.production b/.env.production index 9176918..aa4ba54 100644 --- a/.env.production +++ b/.env.production @@ -5,4 +5,5 @@ API_TOKEN_EXPIRESIN=1d GOOGLE_OAUTH_CLIENT="53206975661-asnf3qe4bg29p8h981pgf099osvrjbme.apps.googleusercontent.com" GOOGLE_OAUTH_CLIENT2="53206975661-ih3r0ubph3rqejdq97b029difbrk2bqj.apps.googleusercontent.com" -DB_MAIN=mongodb://127.0.0.1/wallet-production \ No newline at end of file +GOOGLE_OAUTH_CLIENT_IOS="53206975661-qan0rnefniegjv53ohild375pv0p7ekd.apps.googleusercontent.com" +DB_MAIN=mongodb://localhost/wallet-production \ No newline at end of file diff --git a/boundle.sh b/boundle.sh index a83ba74..815a6e5 100755 --- a/boundle.sh +++ b/boundle.sh @@ -3,14 +3,19 @@ # source /etc/profile # npm install --prefer-offline --loglevel info --unsafe-perm=true --allow-root >> boundle.log # npm run build +yarn build +rm -rf tmp +rm -rf target mkdir tmp mv dist tmp/dist mv node_modules tmp/node_modules cp start.json tmp/start.json +cp .env.production tmp/.env.production cp package.json tmp/package.json echo 'move node_modules to tmp/node_modules' >> boundle.log cd ./tmp/ && tar -zcvf wallet-svr.tar.gz ./ cd .. mkdir target && mv ./tmp/wallet-svr.tar.gz ./target/wallet-svr.tar.gz +mv tmp/node_modules node_modules echo 'all done' 2>&1 >> boundle.log \ No newline at end of file diff --git a/src/controllers/apple.controller.ts b/src/controllers/apple.controller.ts index e118347..9fff2f6 100644 --- a/src/controllers/apple.controller.ts +++ b/src/controllers/apple.controller.ts @@ -3,7 +3,9 @@ import { role, router } from 'decorators/router' import verifyAppleToken from 'verify-apple-id-token' import { Account, PlatEnum } from 'modules/Account' -const CLIENT_ID = 'com.jc.tebg' +const CLIENT_ID_DEBUG = 'com.jc.tebg' +const CLIENT_ID_RELEASE = 'com.cege.games.release' + class AppleController extends BaseController { @role('anon') @router('post /apple/login-notify') @@ -19,7 +21,7 @@ class AppleController extends BaseController { const payload = await verifyAppleToken({ idToken: token, - clientId: CLIENT_ID, + clientId: [CLIENT_ID_DEBUG, CLIENT_ID_RELEASE], }) const openId = payload.sub let data: any = {