CgsAuth
interface CgsAuth
Opening a session, and choosing which profile it runs as.
Obtained from CGS.auth. The SDK does not sign users in itself: you authenticate them however you already do, get a host token from your backend, and exchange it here for an SDK session.
when (val result = CGS.auth().authenticate(hostToken)) {
is CgsResult.Success -> CGS.auth().setCurrentProfile(profileId)
is CgsResult.Failure -> showError(result.cgsError)
}Content copied to clipboard
The session is persisted and refreshed on its own — authenticate once, not on every launch. Check state at startup to know whether you still have one.
Properties
Functions
Link copied to clipboard
Exchanges one of your own tokens for an SDK session, unlocking the content APIs.
Link copied to clipboard
Ends the session and erases what it left on the device — tokens, the active profile, and the cached content that was scoped to it.
Link copied to clipboard
Chooses which profile the session reads as.