This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(accessToken, ctx, cb) { | |
request.get( | |
'https://[MASTODON INSTANCE URL]/api/v1/accounts/verify_credentials', { | |
headers: { | |
'Authorization': `Bearer ${accessToken}` | |
} | |
}, | |
function(err, res, body) { | |
if (err) { | |
return cb(err); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// routes/oauth/mastodon.js | |
const request = require('request'); | |
const authorize = (req) => { | |
// The authorization code returned from Mastodon on a successful login | |
const { code } = req.query; | |
console.log('(1) AUTHORIZATION CODE:', code); | |
// Token endpoint |
OlderNewer