Gathering detailed insights and metrics for flutter
Gathering detailed insights and metrics for flutter
Gathering detailed insights and metrics for flutter
Gathering detailed insights and metrics for flutter
npm install flutter
Typescript
Module System
NPM Version
64.8
Supply Chain
97.3
Quality
77.7
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
69,699
Last Day
34
Last Week
184
Last Month
827
Last Year
8,295
23 Stars
22 Commits
8 Forks
5 Watching
1 Branches
6 Contributors
Minified
Minified + Gzipped
Latest Version
0.0.5
Package Id
flutter@0.0.5
Size
3.75 kB
NPM Version
1.4.28
Cumulative downloads
Total Downloads
Last day
36%
34
Compared to previous day
Last week
-6.6%
184
Compared to previous week
Last month
0.1%
827
Compared to previous month
Last year
82.1%
8,295
Compared to previous year
Managing oauth flow can be a pain and involve a lot of messy code. Flutter helps with that.
1var express = require('express'); 2var Flutter = require('flutter'); 3 4var flutter = new Flutter({ 5 consumerKey: 'MY CONSUMER KEY', 6 consumerSecret: 'MY CONSUMER SECRET', 7 loginCallback: 'http://my-host/twitter/callback', 8 9 authCallback: function(req, res, next) { 10 if (req.error) { 11 // Authentication failed, req.error contains details 12 return; 13 } 14 15 var accessToken = req.session.oauthAccessToken; 16 var secret = req.session.oauthAccessTokenSecret; 17 18 // Store away oauth credentials here 19 20 // Redirect user back to your app 21 res.redirect('/back/to/app'); 22 } 23}); 24 25var app = express(); 26 27app.get('/twitter/connect', flutter.connect); 28 29// URL used in loginCallback above 30app.get('/twitter/callback', flutter.auth); 31 32 33// Direct users to /twitter/connect to initiate oauth flow.
Currently only GET
functions are supported
1// var {accessToken, secret} = retrieve credentials for request 2 3flutter.API.get('search/tweets.json', { q: 'bacon' }, accessToken, secret, function(err, results) { 4 console.log(results); // { statuses: [ { ...etc } ] } 5});
1var flutter = new Flutter({ 2 3 // Pass this to log messages inside Flutter 4 debug: function(msg){ ... }, 5 6 // Twitter API app credentials 7 consumerKey: 'foo', 8 consumerSecret: 'bar', 9 10 // Twitter API login callback 11 loginCallback: 'http://foo.com/authCallback', 12 13 // the URL to redirect to after authorisation is complete and we have tokens 14 // will not be used if authCallback is overridden 15 completeCallback: 'http://foo.com/completeCallback', 16 17 // called immediately before the user is redirected to Twitter's authorize 18 // screen, used this to stash parameters etc on the request session 19 connectCallback: function(req, res, next){}, 20 21 // Called on successful auth. 22 // req.session contains auth parameters (see above) 23 // if not defined, Flutter will redirect to completeCallback specified above 24 authCallback: function(req, res, next){}, 25 26 // Cache lifetime to use for API requests. Set to something falsy to disable cache 27 cache: 60000, 28 29 // Redis config. Used for caching api responses. 30 // `options` is passed to redis.createClient (https://github.com/NodeRedis/node_redis#rediscreateclient) 31 redis: { host: 'localhost', port: 6379, database: 0, options: {} }, 32 33 // set this to a redis client to use instead of creating a new one 34 cacheClient: redisClient, 35 36 // Key prefix used on all cache keys in redis 37 prefix: 'flutter:' 38 39});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 2/18 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More