66{
67 myAuthService.setAuthTokensEnabled(true, "hangmancookie");
68 myAuthService.setEmailVerificationEnabled(true);
69
70 auto verifier = std::make_unique<Auth::PasswordVerifier>();
71 verifier->addHashFunction(std::make_unique<Auth::BCryptHashFunction>(7));
72
73#ifdef HAVE_CRYPT
74
75
76 verifier->addHashFunction(std::make_unique<UnixCryptHashFunction>());
77#endif
78
79 myPasswordService.setVerifier(std::move(verifier));
80 myPasswordService.setStrengthValidator(std::make_unique<Auth::PasswordStrengthValidator>());
81 myPasswordService.setAttemptThrottlingEnabled(true);
82
83 if (Auth::GoogleService::configured()) {
84 myOAuthServices.push_back(std::make_unique<Auth::GoogleService>(myAuthService));
85 }
86}