Glean Settings
Embed Glean settings in your internal app so users can connect datasources that require separate authentication (for example, Slack RTS or GitHub), letting Glean access their private data on their behalf.
renderSettings is marked experimental in the SDK's type definitions and may
change at any time.
Illustrative previewRendered with sample data — in your app, this component renders live against your organization's Glean instance.
Install the SDK
- npm
- Script tag
npm install @gleanwork/web-sdk
Include the JavaScript library in the <head> section of your page. Replace GLEAN_APP_DOMAIN with your company's Glean web app domain (typically app.glean.com or your-company.glean.com if you use a custom subdomain).
<script
defer
src="https://{GLEAN_APP_DOMAIN}/embedded-search-latest.min.js"
></script>
The Glean web app domain differs from your company's Glean backend domain
(find yours at app.glean.com/admin/about-glean under "Server instance (QE)").
The same methods are available on window.GleanWebSDK once the glean:ready event fires.
Render settings
-
Create a container element with
position: relative,display: block, and a defined size — at least 800px wide and 600px tall is recommended. -
Render the settings widget into your container:
import GleanWebSDK from '@gleanwork/web-sdk';
GleanWebSDK.renderSettings(document.getElementById('settings'), {
backend: 'https://{your}-be.glean.com/',
});
Unlike the other components, renderSettings is not exported individually —
call it on the SDK's default export (or on window.GleanWebSDK when using
the script tag).
For the full surface, see the renderSettings API documentation.
Options
| Option | Type | Description |
|---|---|---|
hideUnconfigurableDatasources | boolean | Hide admin-managed datasources that the user cannot configure themselves. |
All components also accept the common Options — backend, authToken, theme, themeVariant, locale, and more.
Browser security features can prevent the OAuth popup from informing the SDK
that a user has successfully authenticated. For the highest reliability, use
the Glean web app or the
checkdatasourceauth API.