You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TotpAutoConfiguration is not being loaded automatically by Spring Boot 3.
As a result, all beans defined in TotpAutoConfiguration, such as SecretGenerator, QrDataFactory, QrGenerator, CodeVerifier, are not recognized.
I had to import TotpAutoConfiguration manually in my Spring Boot 3 application:
Yeah, I also had this issue. You can fix it by doing this though:
@Configuration
public class MfaConfiguration {
@Bean
public TimeProvider timeProvider() {
return new SystemTimeProvider();
}
@Bean
public SecretGenerator secretGenerator() {
return new DefaultSecretGenerator();
}
@Bean
public CodeGenerator codeGenerator() {
return new DefaultCodeGenerator(HashingAlgorithm.SHA1);
}
@Bean
public CodeVerifier codeVerifier(CodeGenerator codeGenerator, TimeProvider timeProvider) {
return new DefaultCodeVerifier(codeGenerator, timeProvider);
}
}
TotpAutoConfiguration
is not being loaded automatically bySpring Boot 3
.As a result, all beans defined in
TotpAutoConfiguration
, such asSecretGenerator
,QrDataFactory
,QrGenerator
,CodeVerifier
, are not recognized.I had to import
TotpAutoConfiguration
manually in mySpring Boot 3
application:The text was updated successfully, but these errors were encountered: