it works!

This commit is contained in:
Joe Tretter
2023-01-10 13:19:22 -06:00
parent 7f96ec1824
commit e8d655a7b2

View File

@@ -1,5 +1,9 @@
// The codes that are displayed are not consistent with the GOOGLE Authenticator
// app.... I guess that TOTP library has an issue...
// to get the code from Google Authenticator you need to decode base32 and
// convert that to hex:
/*
echo -n "F4ZVI6KKNF4SW5DG" |base32 -d | xxd -ps
2f3354794a69792b7466
*/
// I connected SCL to D22 and SDA to D21
@@ -23,10 +27,10 @@
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP);
uint8_t hmacKey[] = {0x62, 0x27, 0x2F, 0x33, 0x54, 0x79, 0x4A,
0x69, 0x79, 0x2B, 0x74, 0x66, 0x27};
uint8_t hmacKey[] = {0x2F, 0x33, 0x54, 0x79, 0x4A,
0x69, 0x79, 0x2B, 0x74, 0x66};
TOTP totp = TOTP(hmacKey, 12);
TOTP totp = TOTP(hmacKey, 10);
char code[7];
unsigned long lastMsg = 0;