@communities-webruntime/services
Version:
If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in Node.js. If you're looking for the CLI documentation [you can find that here](https://www.npmjs.com/package/@communities-webruntime/cli).
20 lines • 551 B
JavaScript
/**
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
import Tokens from 'csrf';
const tokens = new Tokens();
const secret = tokens.secretSync();
function generateToken() {
return tokens.create(secret);
}
function verifyToken(token) {
return tokens.verify(secret, token);
}
export const ClientService = {
generateToken,
verifyToken,
};
//# sourceMappingURL=client-service.js.map