Fixed logic in configureTempAuth to check for token string that isn't == 'NO_AUTH'
diff --git a/helpers/client.js b/helpers/client.js
index 8ffc7f4..e506b88 100644
--- a/helpers/client.js
+++ b/helpers/client.js
@@ -22,12 +22,12 @@
return client
},
configureTempAuth: function(auth) {
- if (_.isString(auth)) {
+ if (_.isString(auth) && auth !== UsergridAuth.NO_AUTH) {
return new UsergridAuth(auth)
- } else if (auth instanceof UsergridAuth) {
- return auth
} else if (!auth || auth === UsergridAuth.NO_AUTH) {
return UsergridAuth.NO_AUTH
+ } else if (auth instanceof UsergridAuth) {
+ return auth
} else {
return undefined
}