Comments (5)
Um, what ? Thats the module exports .. I'm a little confused, thats pretty standard in node isn't it ? (they're not global in the 'window' sense of the word)
from connect-auth.
If You don't declare variable it is global even in node. It is accessible from any other module. Try adding 'use strict'; at the beginnings of all files. It will throw an error.
Of course I'm talking about variable names I listed above. No the module.exports, which is standard for node.
from connect-auth.
hmm, interesting. I hadn't appreciated that (or used in for evil purposes) .. that code was re-factored to look like that by a contributor iirc and the pattern isn't used much elsewhere in the library. As it bleeds it should be removed yes I concur.
from connect-auth.
I tell a lie they're everywhere...um sorry.
from connect-auth.
Happily it should be easy to fix that :)
For future I recommend You switching to strict mode. It fixes that stupid JS behaviours.
I wanted to be sure that I'm right here, so I've made little example:
m1.js:
require('./m2.js');
require('./m3.js');
console.log('m1', a);
m2.js:
a = 1;
m3.js:
console.log('m3', a);
And the result for node m1 is:
$ node /www/tests/m1.js
m3 1
m1 1
So this 'a' variable is accessible even in m3 module.
from connect-auth.
Related Issues (20)
- GET /oauth/authorize doesn't validate oauth_token parameter
- Cannot set property 'twitter_oauth_token_secret' of undefined
- ENOENT on installation HOT 5
- Google2 scopes handled incorrectly
- Modularize
- Per-request scoped scope HOT 5
- session not kept between http callbacks HOT 10
- how to handle authenticated && !req.isAuthenticated()? HOT 18
- Upgrade dependencies to versions that support 0.10.x HOT 1
- Add an explict LICENSE file HOT 1
- Please provide oauth2 client example as oauth2clientapp.js
- Facebook permission Scopes are buggy
- Support connect 2.8.x
- keyfile instructions unclear
- Has this project been abandoned
- upgrade connect to deal with qs vulnerabilities
- tweet on behalf of user HOT 1
- Archive?
- TypeError: Object #<Object> has no method 'fail' HOT 2
- OAuth data provider's tokenByConsumer() allows exactly one request token per consumer HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connect-auth.