findByUserId

suspend fun findByUserId(userId: String): UserKey?

Finds a user key by user ID.

Searches through all stored user keys and returns the first one that matches the specified user ID. Since the save operation replaces existing keys for the same user ID, this will return the most recently saved key for the user.

Return

The UserKey for the specified user, or null if no key is found

Parameters

userId

The unique identifier of the user whose key to find