Compare commits
3 Commits
23cd2136f5
...
6d3abf821a
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d3abf821a | |||
| 879d4b7092 | |||
| 562da693f1 |
30
config.prod.json
Normal file
30
config.prod.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"maingate_mongodb_url": "mongodb://kingdom:Nf9D4XP#TV9L@guudt.vpc.mg.naverncp.com:17017,guue2.vpc.mg.naverncp.com:17017,guue6.vpc.mg.naverncp.com:17017/admin?replicaSet=kd-mongod001",
|
||||||
|
"autologin_ttl": 604800,
|
||||||
|
"redirect_base_url": "https://kdmg.action2quare.com",
|
||||||
|
"google_client_id" : "46698421246-fv2k7chr1j95ju1vm10ogq8prkjt8272.apps.googleusercontent.com",
|
||||||
|
"google_client_secret" : "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",
|
||||||
|
|
||||||
|
"twitter_oauth_key": "1671386871409287169-AIHq3tkoRHK6rPxsWVvvvfXBThqcbn",
|
||||||
|
"twitter_oauth_secret": "dU3GcLUzRAMOTsXTy8hSSkLI2o2pFJM0kdQi1Qc62pPFn",
|
||||||
|
"twitter_customer_key": "eROUWahi2yi3f0pLAIMzmtlUB",
|
||||||
|
"twitter_customer_secret": "zelgFPWgx8o9vqUrBHgTPmuUGDCLjXah33E3pk50u0kxZ9LjIl",
|
||||||
|
|
||||||
|
"apple_client_id": "auth.service.action2quare.com",
|
||||||
|
"apple_privatekey": "-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgi3HkbNY93XdcNJVa\nAzR895cHxPXYeT0HnAOCzW5IOlOgCgYIKoZIzj0DAQehRANCAAS81nJzJcsZWtdr\n7sAeyqyHFoyCBdmsqI3fvLWYj/5M3MqgMI7pYyVbSmtXT9El/67Y4vz2e/9gllLy\ns0S/XoFo\n-----END PRIVATE KEY-----",
|
||||||
|
"apple_service_id": "auth.service.action2quare.com",
|
||||||
|
"apple_team_id": "YC94S4Z6CS",
|
||||||
|
"apple_key_id": "47UBTLARC8",
|
||||||
|
|
||||||
|
"microsoft_client_id": "ebc03204-a5b4-41bf-ac2b-5051615ccf33",
|
||||||
|
"microsoft_client_secret" : "fa78Q~9C4zEadeOf5ACSFsenP35jHVLKdW.jvcNr",
|
||||||
|
|
||||||
|
"gamepot_project_id": "dbfe1334-6dde-43e0-b8a9-cc0733d4c60e",
|
||||||
|
"gamepot_logincheckapi_url": "https://gamepot.apigw.ntruss.com/gpapps/v1/loginauth",
|
||||||
|
|
||||||
|
"firebase_admin_sdk_credentialfile": "kingdom-2b812-firebase-adminsdk-a6j68-d42ae01182.json",
|
||||||
|
|
||||||
|
"maingate_global_admins" : [
|
||||||
|
"mountain@action2quare.com"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,11 +1,16 @@
|
|||||||
# $ErrorActionPreference = 'SilentlyContinue'
|
# $ErrorActionPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
del maingate.zip
|
$CurBranch = git branch --show-current
|
||||||
|
|
||||||
|
Remove-Item maingate.zip -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
cd maingate-console
|
cd maingate-console
|
||||||
|
|
||||||
Copy-Item .env.example.prod .env
|
|
||||||
|
git switch $CurBranch
|
||||||
|
git pull
|
||||||
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
Remove-Item console -Force -Recurse -ErrorAction SilentlyContinue
|
Remove-Item console -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
@ -23,5 +28,4 @@ go build -ldflags="-s -w" .
|
|||||||
|
|
||||||
Compress-Archive -Path config.json -Update -DestinationPath maingate.zip
|
Compress-Archive -Path config.json -Update -DestinationPath maingate.zip
|
||||||
Compress-Archive -Path maingate -Update -DestinationPath maingate.zip
|
Compress-Archive -Path maingate -Update -DestinationPath maingate.zip
|
||||||
Compress-Archive -Path www -Update -DestinationPath maingate.zip
|
|
||||||
Compress-Archive -Path *-firebase-*.json -Update -DestinationPath maingate.zip
|
Compress-Archive -Path *-firebase-*.json -Update -DestinationPath maingate.zip
|
||||||
|
|||||||
223
www/gamepot.html
223
www/gamepot.html
@ -1,223 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>GamePot JS SDK Sandbox</title>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<!-- <meta
|
|
||||||
name="viewport"
|
|
||||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
|
||||||
/> -->
|
|
||||||
|
|
||||||
<!-- <link
|
|
||||||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
|
||||||
rel="stylesheet"
|
|
||||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
/> -->
|
|
||||||
<!-- <script src="https://gamepot.gcdn.ntruss.com/gamepot-sdk-javascript-lastest.min.js"></script> -->
|
|
||||||
<script src="https://cdn.gamepot.io/dev/gamepot-sdk-javascript-1.0.19-b1.min.js"></script>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="container-fluid" style="margin-bottom: 200px;">
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
function onLoginsuccess(user) {
|
|
||||||
// -- 로그인 성공
|
|
||||||
// id: 회원 아이디
|
|
||||||
// token: 로그인 토큰(JWT)
|
|
||||||
// nickname: 닉네임
|
|
||||||
// provider: 소셜 로그인 종류
|
|
||||||
// providerId: 소셜 로그인 ID
|
|
||||||
// verify: 인증여부
|
|
||||||
// agree: 약관 동의 여부
|
|
||||||
//===========================
|
|
||||||
|
|
||||||
const formauth = document.createElement('form');
|
|
||||||
let objs1 = document.createElement('input');
|
|
||||||
objs1.setAttribute('type', 'hidden');
|
|
||||||
objs1.setAttribute('name', 'state');
|
|
||||||
objs1.setAttribute('value', '{{ .State }}');
|
|
||||||
formauth.appendChild(objs1);
|
|
||||||
|
|
||||||
let objs2 = document.createElement('input');
|
|
||||||
objs2.setAttribute('type', 'hidden');
|
|
||||||
objs2.setAttribute('name', 'id');
|
|
||||||
objs2.setAttribute('value', `${user.id}`);
|
|
||||||
formauth.appendChild(objs2);
|
|
||||||
|
|
||||||
let objs3 = document.createElement('input');
|
|
||||||
objs3.setAttribute('type', 'hidden');
|
|
||||||
objs3.setAttribute('name', 'code');
|
|
||||||
objs3.setAttribute('value', `${user.token}`);
|
|
||||||
formauth.appendChild(objs3);
|
|
||||||
|
|
||||||
let objs4 = document.createElement('input');
|
|
||||||
objs4.setAttribute('type', 'hidden');
|
|
||||||
objs4.setAttribute('name', 'nickname');
|
|
||||||
objs4.setAttribute('value', `${user.nickname}`);
|
|
||||||
formauth.appendChild(objs4);
|
|
||||||
|
|
||||||
let objs5 = document.createElement('input');
|
|
||||||
objs5.setAttribute('type', 'hidden');
|
|
||||||
objs5.setAttribute('name', 'provider');
|
|
||||||
objs5.setAttribute('value', `${user.provider}`);
|
|
||||||
formauth.appendChild(objs5);
|
|
||||||
|
|
||||||
let objs6 = document.createElement('input');
|
|
||||||
objs6.setAttribute('type', 'hidden');
|
|
||||||
objs6.setAttribute('name', 'providerId');
|
|
||||||
objs6.setAttribute('value', `${user.providerId}`);
|
|
||||||
formauth.appendChild(objs6);
|
|
||||||
|
|
||||||
let objs7 = document.createElement('input');
|
|
||||||
objs7.setAttribute('type', 'hidden');
|
|
||||||
objs7.setAttribute('name', 'verify');
|
|
||||||
objs7.setAttribute('value', `${user.verify}`);
|
|
||||||
formauth.appendChild(objs7);
|
|
||||||
|
|
||||||
let objs8 = document.createElement('input');
|
|
||||||
objs8.setAttribute('type', 'hidden');
|
|
||||||
objs8.setAttribute('name', 'agree');
|
|
||||||
objs8.setAttribute('value', `${user.agree}`);
|
|
||||||
formauth.appendChild(objs8);
|
|
||||||
|
|
||||||
formauth.setAttribute('method', 'post');
|
|
||||||
formauth.setAttribute('action', '/authorize/gamepot');
|
|
||||||
document.body.appendChild(formauth);
|
|
||||||
formauth.submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function onLoginFail(error) {
|
|
||||||
const formauth = document.createElement('form');
|
|
||||||
formauth.setAttribute('method', 'post');
|
|
||||||
formauth.setAttribute('action', 'actionsquare://error?errormsg='+ encodeURIComponent(`${error.code}-${error.message}`));
|
|
||||||
document.body.appendChild(formauth);
|
|
||||||
formauth.submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSignInGoogle(error, user) {
|
|
||||||
if (error) {
|
|
||||||
// 로그인 실패
|
|
||||||
onLoginFail(error);
|
|
||||||
} else {
|
|
||||||
onLoginsuccess(user);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function SignIn(channeltype) {
|
|
||||||
GP.login(channeltype, function (user, error) {
|
|
||||||
if (error) {
|
|
||||||
// 로그아웃 실패
|
|
||||||
onLoginFail(error);
|
|
||||||
} else {
|
|
||||||
// 로그인 성공
|
|
||||||
onLoginsuccess(user)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function Logout() {
|
|
||||||
// GP.logout(function (error) {});
|
|
||||||
GP.logout(function (result, error) {
|
|
||||||
if (error) {
|
|
||||||
// 로그아웃 실패
|
|
||||||
alert(error); // 오류 메세지
|
|
||||||
} else {
|
|
||||||
// 로그아웃 아웃 완료
|
|
||||||
alert("로그아웃 아웃 완료");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteMember() {
|
|
||||||
if (!userId) {
|
|
||||||
alert("로그인을 먼저 해 주세요.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
GP.deleteMember(userId, function (result, error) {
|
|
||||||
if (error) {
|
|
||||||
// 회원탈퇴 실패
|
|
||||||
alert(error); // 오류 메세지
|
|
||||||
} else {
|
|
||||||
// 회원탈퇴 아웃 완료
|
|
||||||
alert("회원탈퇴 성공!");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function () {
|
|
||||||
// 프로젝트 ID는 게임팟 대시보드에서 확인할 수 있습니다.
|
|
||||||
var project_id = "dbfe1334-6dde-43e0-b8a9-cc0733d4c60e";
|
|
||||||
|
|
||||||
var gamepotConfig = {
|
|
||||||
|
|
||||||
api_url: "https://gpapps.gamepot.ntruss.com",
|
|
||||||
google_signin_client_id:
|
|
||||||
"46698421246-aeg0c2pmsgifr3fi06jgnqag5u8ph3kn.apps.googleusercontent.com",
|
|
||||||
google: {
|
|
||||||
callback: onSignInGoogle, // callback 버튼
|
|
||||||
renderButton: "googleRenderButton", // 버튼 DIV 이름
|
|
||||||
option: {
|
|
||||||
// google button option
|
|
||||||
size: "large",
|
|
||||||
theme: "outline",
|
|
||||||
width: "375",
|
|
||||||
text: "signup_with",
|
|
||||||
shape: "rectangular",
|
|
||||||
logo_alignment: "left",
|
|
||||||
locale: "ko_kr"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
facebook_app_id: "2930531180541185",
|
|
||||||
apple_client_id: "auth.service.action2quare.com",
|
|
||||||
apple_redirect_uri: "{{.RedirectBaseUrl}}/authorize/apple",
|
|
||||||
api_key: "b94615af2a956facd2add44ea50529154b35f520de85673d",
|
|
||||||
};
|
|
||||||
|
|
||||||
GP.initialize(project_id, gamepotConfig);
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<div id="googleRenderButton"></div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<table class="table" border="0" width="400" bgcolor="white" style="table-layout: fixed" onclick="SignIn(GP.ChannelType.APPLE)">
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<div
|
|
||||||
id="appleid-signin"
|
|
||||||
data-mode="center-align"
|
|
||||||
data-type="sign-in"
|
|
||||||
data-color="white"
|
|
||||||
data-border="true"
|
|
||||||
data-border-radius="15"
|
|
||||||
data-width="375"
|
|
||||||
data-height="40"
|
|
||||||
data-logo-size="medium"
|
|
||||||
data-logo-position="47"
|
|
||||||
data-label-position="135"
|
|
||||||
style="pointer-events: none"
|
|
||||||
></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
276
www/toCDN/gamepot-sdk-javascript-1.0.19-b1.min.js
vendored
276
www/toCDN/gamepot-sdk-javascript-1.0.19-b1.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user