-
Notifications
You must be signed in to change notification settings - Fork 2
/
state.js
39 lines (34 loc) · 1.18 KB
/
state.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')
const fs = require('fs-extra')
const path = require('path')
const homeDir = require('os').homedir()
const stateFile = path.join(homeDir, '.spotydrive.json')
fs.ensureFileSync(stateFile)
const adapter = new FileSync(stateFile)
const db = low(adapter)
db.defaults({
spotify: {
oauth2: {
clientId: '08ccea97589044b7b339a2d2d4839743',
clientSecret: 'a698f263d34e427c8f4c14e95bdc9aa3',
redirectUri: 'http://lvh.me:7777',
scopes: 'user-read-email playlist-read-private',
authorizeEndpoint: 'https://accounts.spotify.com/authorize',
tokenEndpoint: 'https://accounts.spotify.com/api/token'
},
token: { }
},
youtube: {
oauth2: {
clientId: '928191779252-kdrfa9pdb61albcnq7fntkdbtj9bbnsg.apps.googleusercontent.com',
clientSecret: 'evAc19nUWFHpFRtePO_107Hh',
redirectUri: 'http://localhost:7777',
scopes: 'https://www.googleapis.com/auth/youtube.readonly',
authorizeEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',
tokenEndpoint: 'https://www.googleapis.com/oauth2/v4/token'
},
token: { }
}
}).write()
module.exports = db