Skip to main content
Version: 3.0.0

Sodexo Web Components Library

The Sodexo Web Components Library provides ready-to-use features for corporate catering, as found in the Toqla application.

Getting Started

To use the library, load the script and wrap your templates inside the sodexo-app-provider component.

<head>
<!-- src: secure HTTPS link to Sodexo's CDN — request the URL from Sodexo -->
<script type="module" src="Request it from Sodexo" data-stencil></script>
</head>

<body>
<script>
const appProvider = document.getElementById("app-provider");
appProvider.apiKey = "my-api-key";

// You don't need to provide these parameters if you use public templates.
// If you use the connected templates, Sodexo will provide you with this information.
appProvider.authConfig = {
domain: "my-domain",
clientId: "my-client-id",
redirectUri: "my-redirect-uri",
audience: "my-audience",
scope: "my-scope",
};
</script>
<sodexo-app-provider id="app-provider">
<my-app></my-app>
</sodexo-app-provider>
</body>
Authentication

Some templates require user authentication. See the Authentication page for details.