attest
Attests the current session using a Stytch Trusted Auth Token. Calls the POST /sdk/v1/sessions/attest endpoint.
Kotlin:
StytchConsumer.sessions.attest(
SessionsAttestParameters(
profileId = "profile-id",
token = "integrity-token",
)
)Content copied to clipboard
iOS:
let params = SessionsAttestParameters(profileId: "profile-id", token: "integrity-token")
let response = try await StytchConsumer.sessions.attest(params)Content copied to clipboard
React Native:
StytchConsumer.sessions.attest({ profileId: "profile-id", token: "integrity-token" })Content copied to clipboard
Return
SessionsAttestResponse containing the updated session.
Parameters
request
ISessionsAttestParameters
profileId— The device profile ID from the integrity provider.token— The Stytch Trusted Auth TokensessionDurationMinutes?— If provided, extends the session by this many minutes.
Throws
StytchError
if the attestation token is invalid.
if the coroutine is cancelled.