Properties
Last updated
Was this helpful?
Properties give you a quick read of the current SDK state. Use userChange events to keep your UI in sync; use these properties when you need a one-off check of what tiun knows right now.
// Quick read of current state
console.log(tiun.isAuthenticated);
console.log(tiun.user);
// Keep your UI in sync with events
tiun.on('userChange', (data) => {
myState.isAuthenticated = data.isAuthenticated;
myState.user = data.user;
});tiun.version
string
The SDK version.
tiun.isInitialized
boolean
Whether init() has been called.
tiun.isReady
boolean
Whether the snippet is ready to use.
tiun.isAuthenticated
boolean
Whether the user has a valid session.
tiun.user
UserInfo | null
Current user info, or null if not logged in.
Last updated
Was this helpful?
Was this helpful?

