Created
March 28, 2020 10:57
-
-
Save callmephilip/406827aa0db7fa6f3ab1e9616334b3f0 to your computer and use it in GitHub Desktop.
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.use('/api', passport.authenticate('basic', { session: false })); | |
app.post('/api/ping', (req, res) => { | |
res.send(`pong ${req.user.emails[0].address}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment