Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for OAuth CouchDB App

CouchDB OAuth app had a bug that was dependent upon console.log() being defined (like Chrome or Firebug creates.)

Signed-off-by: Jim Klo <jim.klo@sri.com>
  • Loading branch information...
commit 74be7c90b15a8f108bb7b88596b9f2c6a905fb68 1 parent a366db4
@jimklo jimklo authored
View
2  LR/setup.py
@@ -7,7 +7,7 @@
setup(
name='LR',
- version='0.23.8',
+ version='0.23.9',
description='',
author='',
author_email='',
View
8 couchdb/apps/kanso/oauth-key-management.json
4 additions, 4 deletions not shown
View
4 couchdb/apps/kanso/oauth-key-management/css/style.css
@@ -46,4 +46,6 @@ img {
float: right;
}
-.clear: both;
+.clear {
+ clear: both;
+}
View
17 couchdb/apps/kanso/oauth-key-management/lib/manage-tokens.js
@@ -3,6 +3,15 @@ var session = require("session"),
users = require("users"),
_ = require("underscore")._;
+function log(msg) {
+ try{
+ console.log(msg)
+ } catch (e) {
+
+ }
+}
+
+
function getOAuth(email, doc, regenerate) {
if (regenerate || !(doc.oauth
&& doc.oauth.consumer_keys
@@ -24,7 +33,7 @@ function getOAuth(email, doc, regenerate) {
users.update(email, null, doc, function(err) {
if (err) {
- console.log(err);
+ log(err);
} else {
getUserInfo(email);
}
@@ -78,7 +87,7 @@ function setSigningInfo() {
users.update(session_info.userCtx.name, null, doc, function(err) {
if (err) {
- console.log(err);
+ log(err);
setMessage("Unable to save signing information.");
} else {
setMessage("Information saved.")
@@ -150,7 +159,7 @@ function savePassword() {
users.update(session_info.userCtx.name, null, doc, function(err) {
if (err) {
- console.log(err);
+ log(err);
setMessage("Unable to save publish password.");
} else {
setMessage("Password saved.");
@@ -179,7 +188,7 @@ exports.registerCallbacks = function() {
}
if (email) {
- console.log(email);
+ log(email);
getUserInfo(email);
}
} catch (error) {
Please sign in to comment.
Something went wrong with that request. Please try again.