ApiKeyAuthProvider requires a registered IAuthRepository

We are using ServiceStack v6 and trying to use the ApiKeyAuthProvider.

After enabling the ApiKeyAuthProvider an

ApiKeyAuthProvider requires a registered IAuthRepository’

error is thrown.

Currently we are only registering IAuthRepositoryAsync with a custom auth repository (that implements IManageApiKeysAsync).

The message seems to imply that we need to register and implement the IAuthRepository interface as well or are we doing something wrong? I was expecting to be able to use async only and have GetAuthRepositoryAsync() work with the API Key Auth.

Yeah ApiKeyAuthProvider still requires a sync IManageApiKeys and IAuthRepository I’ll look at changing it in a future version so it works with either, as a temp workaround you could implement the sync interfaces and just return GetAwaiter().GetResult() of your async API which you’ll be able to remove in a future version.

Thanks, I think we’ll work with implementing the sync interfaces for now.