Authenticate your user
1. Install and initialize the SDK
import { tiun } from '@tiun/sdk';
tiun.init({
snippetId: 'YOUR_SNIPPET_ID',
language: 'en',
});2. Add a login button
function onClickLogin() {
tiun.login();
}3. Add a logout button
4. React to user state changes
5. Session restore is automatic
Full example
Last updated
Was this helpful?