yuque-auth
Yu Que Di San Fang Ying Yong De Ke Hu Duan Jian Quan Ke Hu Duan .
install
tnpm install yuque-auth
Usage
{
console.log('get auth', res);
//{ access_token: 'Y1iwvwUPI4M67VjWRGHAzgq7gzB4a21EV3jOhyFf', token_type: 'bearer', scope: 'repo,doc' }
}).catch(err => {
console.log('error happened', err.stack);
});">const { auth } = require('yuque-auth');
auth({
// clientId He clientSevretZai oauth Ying Yong Zhong Ke Cha Dao
clientId,
clientSecret,
scope: 'repo,doc',
}).then(res => {
console.log('get auth', res);
//{ access_token: 'Y1iwvwUPI4M67VjWRGHAzgq7gzB4a21EV3jOhyFf', token_type: 'bearer', scope: 'repo,doc' }
}).catch(err => {
console.log('error happened', err.stack);
});
auth({
// clientId He clientSevretZai oauth Ying Yong Zhong Ke Cha Dao
clientId,
clientSecret,
scope: 'repo,doc',
}).then(res => {
console.log('get auth', res);
//{ access_token: 'Y1iwvwUPI4M67VjWRGHAzgq7gzB4a21EV3jOhyFf', token_type: 'bearer', scope: 'repo,doc' }
}).catch(err => {
console.log('error happened', err.stack);
});