@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "redisGoogleAuthenticatorAccountRegistry")
    public OneTimeTokenCredentialRepository googleAuthenticatorAccountRegistry(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier(CasGoogleAuthenticator.BEAN_NAME)
        final CasGoogleAuthenticator googleAuthenticatorInstance,
        @Qualifier("googleAuthenticatorAccountCipherExecutor")
        final CipherExecutor googleAuthenticatorAccountCipherExecutor,
        @Qualifier("googleAuthenticatorScratchCodesCipherExecutor")
        final CipherExecutor googleAuthenticatorScratchCodesCipherExecutor,
        @Qualifier("redisAccountsGoogleAuthenticatorTemplate")
        final CasRedisTemplate redisAccountsGoogleAuthenticatorTemplate,
        @Qualifier("redisPrincipalsGoogleAuthenticatorTemplate")
        final CasRedisTemplate redisPrincipalsGoogleAuthenticatorTemplate,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(OneTimeTokenCredentialRepository.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val redisTemplates = new RedisGoogleAuthenticatorTokenCredentialRepository.CasRedisTemplates(
                    redisAccountsGoogleAuthenticatorTemplate, redisPrincipalsGoogleAuthenticatorTemplate);
                return new RedisGoogleAuthenticatorTokenCredentialRepository(googleAuthenticatorInstance, redisTemplates,
                    googleAuthenticatorAccountCipherExecutor, googleAuthenticatorScratchCodesCipherExecutor);
            })
            .otherwiseProxy()
            .get();

    }
This is {@link CasGoogleAuthenticatorRedisAutoConfiguration}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-gauth-redis/src/main/java/org/apereo/cas/config/CasGoogleAuthenticatorRedisAutoConfiguration.java