commit 6878c79dd6974e6d4571601b3a00863b3a850211
parent 24b6a829dd2dcf42abcb75d0b194b1b8dd0e3b21
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Fri, 19 Feb 2016 22:13:28 +0300
Add OAuth sample keys to config.js
Diffstat:
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/src/components/Html/Html.js b/src/components/Html/Html.js
@@ -8,7 +8,7 @@
*/
import React, { Component, PropTypes } from 'react';
-import { googleAnalyticsId } from '../../config';
+import { analytics } from '../../config';
class Html extends Component {
@@ -32,7 +32,7 @@ class Html extends Component {
`e=o.createElement(i);r=o.getElementsByTagName(i)[0];` +
`e.src='https://www.google-analytics.com/analytics.js';` +
`r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));` +
- `ga('create','${googleAnalyticsId}','auto');ga('send','pageview');`,
+ `ga('create','${analytics.google.trackingId}','auto');ga('send','pageview');`,
});
}
diff --git a/src/config.js b/src/config.js
@@ -7,6 +7,37 @@
* LICENSE.txt file in the root directory of this source tree.
*/
+/* eslint-disable max-len */
+/* jscs:disable maximumLineLength */
+
export const port = process.env.PORT || 5000;
export const host = process.env.WEBSITE_HOSTNAME || `localhost:${port}`;
-export const googleAnalyticsId = 'UA-XXXXX-X';
+
+export const analytics = {
+
+ // https://analytics.google.com/
+ google: { trackingId: process.env.GOOGLE_TRACKING_ID || 'UA-XXXXX-X' },
+
+};
+
+export const auth = {
+
+ // https://developers.facebook.com/
+ facebook: {
+ id: process.env.FACEBOOK_ID || '183246425378777',
+ secret: process.env.FACEBOOK_SECRET || 'cb2b201f0249d15454221cbf00d6ff99',
+ },
+
+ // https://cloud.google.com/console/project
+ google: {
+ id: process.env.GOOGLE_CLIENT_ID || '251410730550-ahcg0ou5mgfhl8hlui1urru7jn5s12km.apps.googleusercontent.com',
+ secret: process.env.GOOGLE_CLIENT_SECRET || 'Y8yR9yZAhm9jQ8FKAL8QIEcd',
+ },
+
+ // https://apps.twitter.com/
+ twitter: {
+ key: process.env.TWITTER_CONSUMER_KEY || 'Ie20AZvLJI2lQD5Dsgxgjauns',
+ secret: process.env.TWITTER_CONSUMER_SECRET || 'KTZ6cxoKnEakQCeSpZlaUCJWGAlTEBJj0y2EMkUBujA7zWSvaQ',
+ },
+
+};