How to use the sharetribe-flex-sdk.tokenStore function in sharetribe-flex-sdk

To help you get started, we’ve selected a few sharetribe-flex-sdk examples, based on popular ways it is used in public projects.

github sharetribe / ftw-daily / server / index.js View on Github external
// The express.static middleware only handles static resources
    // that it finds, otherwise passes them through. However, we don't
    // want to render the app for missing static resources and can
    // just return 404 right away.
    return res.status(404).send('Static asset not found.');

  if (req.url === '/_status.json') {
    return res.status(200).send({ status: 'ok' });

  const context = {};

  // Get handle to tokenStore
  // We check in unauthorized cases if requests have set tokens to cookies
  const tokenStore = sharetribeSdk.tokenStore.expressCookieStore({
    clientId: CLIENT_ID,
    secure: USING_SSL,

  const baseUrl = BASE_URL ? { baseUrl: BASE_URL } : {};

  const sdk = sharetribeSdk.createInstance({
    transitVerbose: TRANSIT_VERBOSE,
    clientId: CLIENT_ID,
    httpAgent: httpAgent,
    httpsAgent: httpsAgent,
    typeHandlers: [


Sharetribe Flex SDK for JavaScript

Latest version published 5 months ago

Package Health Score

65 / 100
Full package analysis