SSO overview
Full token-generation flow. SSO →
The Vuukle widgets expose a small JavaScript surface for SSO and for native mobile WebView integrations. There is no general-purpose DOM-event API — for behavioural changes you configure the widget from the dashboard, not by listening to events.
After the widgets have loaded, you can drive authentication imperatively:
// Log a user in via SSO with a server-signed tokenwindow.vuukleLogin(BASE64_SSO_TOKEN);
// Log the current user outwindow.vuukleLogout();Both are global functions added by platform.js. Call vuukleLogin once you’ve authenticated the visitor in your own system and minted a token (see Generate an SSO token for code samples).
When each widget finishes initialising, Vuukle prints a console message:
| Message | Fired when |
|---|---|
Comments initialized! | The comment widget has finished its first paint. |
Emotes initialized! | The emote widget has finished its first paint. |
ShareBar initialized! | The ShareBar has finished its first paint. |
Inside a WebView you can intercept these via:
WebChromeClient.onConsoleMessage(). See Android integration for the snippet.WKScriptMessageHandler. See iOS integration.This is how the mobile WebView integrations know when the widget is ready to receive an SSO token via evaluateJavaScript.
SSO overview
Full token-generation flow. SSO →
Generate an SSO token
Node / Python / PHP. SSO token →
Android integration
WebView setup. Android →
iOS integration
WKWebView setup. iOS →