Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged Snyk Bot's Updates #74

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
package-lock.json
credentials.json
7 changes: 4 additions & 3 deletions authorization_code/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ var request = require('request'); // "Request" library
var cors = require('cors');
var querystring = require('querystring');
var cookieParser = require('cookie-parser');
var credJson = require("../credentials.json");

var client_id = 'CLIENT_ID'; // Your client id
var client_secret = 'CLIENT_SECRET'; // Your secret
var redirect_uri = 'REDIRECT_URI'; // Your redirect uri
var client_id = credJson['client-id']; // Your client id
var client_secret = credJson['client-secret']; // Your secret
var redirect_uri = credJson['callback-uri']; // Your redirect uri

/**
* Generates a random string containing numbers and letters
Expand Down
7 changes: 4 additions & 3 deletions client_credentials/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
*/

var request = require('request'); // "Request" library
var credJson = require("../credentials.json");

var client_id = 'CLIENT_ID'; // Your client id
var client_secret = 'CLIENT_SECRET'; // Your secret
var client_id = credJson["client-id"]; // Your client id
var client_secret = credJson["client-secret"]; // Your secret

// your application requests authorization
var authOptions = {
Expand All @@ -30,7 +31,7 @@ request.post(authOptions, function(error, response, body) {
// use the access token to access the Spotify Web API
var token = body.access_token;
var options = {
url: 'https://api.spotify.com/v1/users/jmperezperez',
url: 'https://api.spotify.com/v1/users/menefee7463',
headers: {
'Authorization': 'Bearer ' + token
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Basic examples of the Spotify authorization flows through OAuth 2",
"version": "0.0.2",
"dependencies": {
"cookie-parser": "1.3.2",
"cookie-parser": "1.4.5",
"express": "~4.16.0",
"cors": "^2.8.4",
"querystring": "~0.2.0",
"request": "~2.83.0"
"request": "~2.88.0"
}
}