userKeySelector

fun userKeySelector(block: suspend (List<UserKey>) -> UserKey)

Configures a custom user key selection strategy.

This method allows you to override the default user key selection behavior when multiple keys are available for the same user and authentication type.

Example:

userKeySelector { keys ->
// Select the most recently created key
keys.maxByOrNull { it.createdDate } ?: keys.first()
}

Parameters

block

Suspend function that takes a list of UserKey objects and returns the selected one