Skip to content

Instantly share code, notes, and snippets.

@callmephilip
Created March 28, 2020 10:57
Show Gist options
  • Save callmephilip/406827aa0db7fa6f3ab1e9616334b3f0 to your computer and use it in GitHub Desktop.
Save callmephilip/406827aa0db7fa6f3ab1e9616334b3f0 to your computer and use it in GitHub Desktop.
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