expiration Handler
A lambda-based handler for authentication expiration events.
Important: This API is in preview and provides a closure-based replacement for the callback property, offering a more modern approach to handling authentication expiration events. This will replace the delegate pattern in v5.
This handler is called when authentication is about to expire and allows you to perform login or other necessary actions before expiration.
Note: This handler must be set when using Server-based connectivity (DittoConfigConnect.Server), or Ditto.startSync will throw an AuthenticationError with reason ExpirationHandlerMissing.