public function create(User $user, string $username, string $password): AuthenticationRecordInterface
    {
        $this->enforcePasswordStrength($password);

        $auth = $this->registerAuthenticationRecord($user, $username, $password);
        $this->setSessionCookies($auth);
        $this->setIdentity($user);

        return $auth;
    }