2018-12-17 17:38:05 +00:00
|
|
|
const withToken = require('./withToken');
|
|
|
|
const AuthAPI = require('../../AuthAPI');
|
2017-11-11 20:18:13 +00:00
|
|
|
|
2018-09-01 13:37:48 +00:00
|
|
|
function withRevokedToken(scopes, done) {
|
2017-11-11 20:18:13 +00:00
|
|
|
withToken(scopes, token => {
|
|
|
|
AuthAPI.revokeToken(token).then(() => {
|
2018-09-01 13:37:48 +00:00
|
|
|
done(token);
|
2018-02-18 02:00:56 +00:00
|
|
|
});
|
|
|
|
});
|
2017-11-11 20:18:13 +00:00
|
|
|
}
|
|
|
|
|
2018-02-18 02:00:56 +00:00
|
|
|
module.exports = withRevokedToken;
|