mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-10 17:12:48 +00:00
server - added distillery for prod builds
This commit is contained in:
@@ -1,36 +1,11 @@
|
||||
// for prod site
|
||||
// TODO:
|
||||
const prod_id = '';
|
||||
const prod_redirect_uri = 'https://dev.classicwowforums.com/oauth';
|
||||
const config = require('../../../../config/client.secret.json');
|
||||
|
||||
// for dev site
|
||||
const dev_id = 'dy22zpswn6b5q22zjparrcn83jkdre9h';
|
||||
const dev_redirect_uri = 'https://dev.classicwowforums.com/oauth';
|
||||
|
||||
// for local site
|
||||
const local_id = 'h8fx6ad624ne9qw2njxx6343za7fux3j';
|
||||
const local_redirect_uri = 'https://localhost/oauth';
|
||||
|
||||
let client_id;
|
||||
let redirect_uri;
|
||||
|
||||
switch (process.env.NODE_ENV) {
|
||||
case 'production':
|
||||
client_id = prod_id;
|
||||
redirect_uri = prod_redirect_uri;
|
||||
break;
|
||||
case 'dev':
|
||||
client_id = dev_id;
|
||||
redirect_uri = dev_redirect_uri;
|
||||
break;
|
||||
default:
|
||||
client_id = local_id;
|
||||
redirect_uri = local_redirect_uri;
|
||||
}
|
||||
const { bnet_client_id, bnet_redirect_uri } = config;
|
||||
|
||||
// TODO: support for eu etc.
|
||||
const oauthUrl =
|
||||
`https://us.battle.net/oauth/authorize?redirect_uri=${redirect_uri}&scope=wow.profile&client_id=${client_id}&response_type=code`;
|
||||
`https://us.battle.net/oauth/authorize?redirect_uri=` +
|
||||
`${bnet_redirect_uri}&scope=wow.profile&client_id=${bnet_client_id}&response_type=code`;
|
||||
|
||||
const openOuathWindow = () => {
|
||||
window.open(oauthUrl, '_blank', 'resizeable=yes, height=900, width=1200');
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
{
|
||||
"name": "react_starter",
|
||||
"version": "1.0.0",
|
||||
"version": "0.0.1",
|
||||
"description": "A seed for a simple react application with typescript.",
|
||||
"scripts": {
|
||||
"build": "webpack -p --progress --colors",
|
||||
"build:dev": "NODE_ENV=dev webpack -p --progress --colors",
|
||||
"build:prod": "NODE_ENV=production webpack -p --progress --colors",
|
||||
"dev": "webpack --progress --colors --watch",
|
||||
"c9": "webpack-dev-server --host 0.0.0.0 --port 8080 --inline --history-api-fallback",
|
||||
"start": "webpack-dev-server --inline --history-api-fallback",
|
||||
"update-latest": "rm -rf node_modules && rm yarn.lock && ncu --upgrade --upgradeAll && yarn install"
|
||||
},
|
||||
"author": "Mitchell Gerber",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/fingerprintjs2": "^1.5.1",
|
||||
"@types/lodash": "^4.14.92",
|
||||
|
||||
Reference in New Issue
Block a user