a working authd/authclient - mostly
[ga4php.git] / lib / ga4php.php
index a052575..6c4e156 100644 (file)
@@ -112,7 +112,10 @@ abstract class GoogleAuthenticator {
                // consider scrapping this
                $token = $this->internalGetData($username);
                $token["tokenkey"] = $key;
-               $this->internalPutData($username, $token);              
+               $this->internalPutData($username, $token);
+               
+               // TODO error checking
+               return true;
        }
        
        
@@ -147,7 +150,7 @@ abstract class GoogleAuthenticator {
                switch($ttype) {
                        case "HOTP":
                                error_log("in hotp");
-                               $st = $tlid;
+                               $st = $tlid+1;
                                $en = $tlid+$this->hotpSkew;
                                for($i=$st; $i<$en; $i++) {
                                        $stest = $this->oath_hotp($tkey, $i);