DittoAuthenticationExpirationHandler

typealias DittoAuthenticationExpirationHandler = suspend (ditto: DittoBase, timeUntilExpiration: Double) -> Unit

A lambda-based handler for authentication expiration events.

Important: This API is in preview and provides a modern, async closure-based handler for authentication expiration events. This provides a modern alternative to the phased out DittoAuthenticationCallback interface in v5.

This handler is called when authentication is about to expire and allows you to perform login or other necessary actions before expiration.

Parameters

ditto

The Ditto instance that requires authentication renewal

timeUntilExpiration

Time in seconds until the authentication expires