@Override
    public OneTimeTokenAccount update(final OneTimeTokenAccount account) {
        val encodedAccount = encode(account);
        this.mongoTemplate.save(encodedAccount, this.collectionName);
        return encodedAccount;
    }
This is {@link MongoDbGoogleAuthenticatorTokenCredentialRepository}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-gauth-mongo/src/main/java/org/apereo/cas/gauth/credential/MongoDbGoogleAuthenticatorTokenCredentialRepository.java