'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var api = require('./api.js');
var errors = require('./errors.js');

/**
 * Provides access to session tokens, which can be used to verify token claims on your app's server.
 */
function useSessionToken() {
  const api$1 = api.useApi();
  const extensionTarget = api$1.extension.target;
  if (!('sessionToken' in api$1)) {
    throw new errors.ExtensionHasNoFieldError('sessionToken', extensionTarget);
  }
  return api$1.sessionToken;
}

exports.useSessionToken = useSessionToken;
