Skip to content

Instantly share code, notes, and snippets.

@astrotars
Last active October 1, 2018 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astrotars/76f72742eb08497eb54c89951b16080b to your computer and use it in GitHub Desktop.
Save astrotars/76f72742eb08497eb54c89951b16080b to your computer and use it in GitHub Desktop.
module.exports.token = (event, context, callback) => {
const data = JSON.parse(event.body);
const token = streamClient.createUserSessionToken(data.user);
const response = {
statusCode: 200,
body: JSON.stringify({ token: token })
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment