From 553c695dcc6e7b60ce80039f71aaf1837b696ce8 Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Sat, 11 Nov 2017 17:30:53 -0600 Subject: [PATCH 1/3] remove auth token from connect examples" --- angular/simple/app.js | 2 +- javascript/online-list.html | 2 +- jquery/kitchen-sink/app.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/angular/simple/app.js b/angular/simple/app.js index 451b57c..89cc563 100644 --- a/angular/simple/app.js +++ b/angular/simple/app.js @@ -114,7 +114,7 @@ angular.module('chatApp', ['open-chat-framework']) // create a user for myself and store as ```me``` - $scope.ChatEngine.connect(new Date().getTime(), {}, 'auth-key'); + $scope.ChatEngine.connect(new Date().getTime()); $scope.ChatEngine.on('$.ready', (data) => { diff --git a/javascript/online-list.html b/javascript/online-list.html index a62fb64..140511c 100644 --- a/javascript/online-list.html +++ b/javascript/online-list.html @@ -67,7 +67,7 @@ ChatEngine.connect(username, { signedOnTime: now - }, 'auth-key'); + }); diff --git a/jquery/kitchen-sink/app.js b/jquery/kitchen-sink/app.js index 670d23e..d9c3de4 100644 --- a/jquery/kitchen-sink/app.js +++ b/jquery/kitchen-sink/app.js @@ -327,7 +327,7 @@ ChatEngine = ChatEngineCore.create({ let username = window.location.hash.substr(1); // create a user for myself and store as ```me``` -ChatEngine.connect(username || new Date().getTime().toString(), {}, 'auth-key'); +ChatEngine.connect(username || new Date().getTime().toString()); ChatEngine.on('$.session.chat.join', (data) => { From 801edf1a03f6ff897cbe9ab4ee769428af6b07a6 Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Sat, 11 Nov 2017 17:39:31 -0600 Subject: [PATCH 2/3] remove more auth keys --- javascript/chat.html | 2 +- nodejs/bot.js | 2 +- react-native/App.js | 2 +- react/src/index.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/chat.html b/javascript/chat.html index 0c97cfb..2164177 100644 --- a/javascript/chat.html +++ b/javascript/chat.html @@ -56,7 +56,7 @@ ChatEngine.connect(username, { signedOnTime: now - }, 'auth-key' + new Date().getTime()); + }); ChatEngine.on('$.ready', (data) => { diff --git a/nodejs/bot.js b/nodejs/bot.js index 2ad7ce1..29a9f95 100644 --- a/nodejs/bot.js +++ b/nodejs/bot.js @@ -13,7 +13,7 @@ var ChatEngine = ChatEngineCore.create({ debug: false }); -ChatEngine.connect('robot', { username: 'rob-the-robot' }, 'auth-key'); +ChatEngine.connect('robot', { username: 'rob-the-robot' }); var chats = {}; diff --git a/react-native/App.js b/react-native/App.js index 901b49c..373b3f0 100644 --- a/react-native/App.js +++ b/react-native/App.js @@ -53,7 +53,7 @@ export default class PizzaTranslator extends Component { ChatEngine.connect(username, { signedOnTime: now, email: new Date() - }, 'auth-key'); + }); ChatEngine.on('$.ready', (data) => { diff --git a/react/src/index.js b/react/src/index.js index bada0fe..36d4b11 100644 --- a/react/src/index.js +++ b/react/src/index.js @@ -15,7 +15,7 @@ const ChatEngine = ChatEngineCore.create({ ChatEngine.connect(username, { signedOnTime: now -}, 'auth-key'); +}); var Message = React.createClass({ render: function() { From 9ef6d4d4e5284f59f3e545068686edd30858c21d Mon Sep 17 00:00:00 2001 From: Craig Baumgarten Date: Fri, 17 May 2019 11:58:17 -0700 Subject: [PATCH 3/3] No keys pls --- react/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react/src/index.js b/react/src/index.js index 36d4b11..78dcd45 100644 --- a/react/src/index.js +++ b/react/src/index.js @@ -7,8 +7,8 @@ const now = new Date().getTime(); const username = ['user', now].join('-'); const ChatEngine = ChatEngineCore.create({ - publishKey: 'pub-c-d8599c43-cecf-42ba-a72f-aa3b24653c2b', - subscribeKey: 'sub-c-6c6c021c-c4e2-11e7-9628-f616d8b03518' + publishKey: '', + subscribeKey: '' }, { globalChannel: 'chat-engine-react' });