Created
March 25, 2019 03:32
-
-
Save iskenxan/2e568aa1dca04fc32beeefcce26f8a08 to your computer and use it in GitHub Desktop.
Gmail add-on. Token Url
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
app.post('/token', (req, res) => { | |
const { code } = req.body; | |
console.log(code); | |
const result = {}; | |
if (!code || code.length <= 0) { | |
result.error = 'no valid code!' | |
} else { | |
result.expires_in = 2592000 | |
} | |
res.status(200).send(JSON.stringify(result)) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment