Last active
May 31, 2019 08:57
-
-
Save anchetaWern/1db286cc4a92798f7f058303a6d650a6 to your computer and use it in GitHub Desktop.
React Native Stream Group Chat Tutorial: add auth route
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
// server/server.js | |
app.post("/auth", async (req, res) => { | |
const user_id = req.body.user_id; | |
console.log('user ID: ', user_id); | |
if (!user_id) { | |
return res.status(400); | |
} | |
return res.send({ | |
token: server_side_client.createToken(user_id) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment