diff --git a/globals/functions.php b/globals/functions.php index 61d3978..5a3ae43 100644 --- a/globals/functions.php +++ b/globals/functions.php @@ -5171,7 +5171,6 @@ function usingCustomThumbnail($id) //so the thumb doesnt break while rendering function handleRenderPlace($placeid) //we have a 60 second wait, and we verify the render job was sent. { $assetinfo = getAssetInfo($placeid); - $creatorid = $assetinfo->CreatorId; $lastrender = $assetinfo->lastPlaceRender; if(($lastrender + (60)) < time()) //60 second interval diff --git a/html/settings/index.php b/html/settings/index.php index ca276ea..7778e2f 100644 --- a/html/settings/index.php +++ b/html/settings/index.php @@ -95,6 +95,12 @@ $body = << +
+
+
Authenticator Secret:
+ +
+
@@ -244,11 +250,12 @@ function activate2FA(code) }); } -function set2FAQR() +function setup2FA() { - getJSONCDS("https://api.alphaland.cc/settings/twofactor/qr") + getJSONCDS("https://api.alphaland.cc/settings/twofactor/settings") .done(function(object) { $("#settings_qrcode").attr("src",object.qr); + $("#settings_auth_secret").html(object.secret); }); } @@ -315,7 +322,7 @@ function initializeSettings() if (object.twofactorenabled) { twofactorEnabled(); } else { - set2FAQR(); + setup2FA(); twofactorDisabled(); } diff --git a/html_api/settings/twofactor/qr.php b/html_api/settings/twofactor/settings.php similarity index 72% rename from html_api/settings/twofactor/qr.php rename to html_api/settings/twofactor/settings.php index 9c6544e..9b17dfd 100644 --- a/html_api/settings/twofactor/qr.php +++ b/html_api/settings/twofactor/settings.php @@ -12,4 +12,4 @@ header('Content-Type: application/json'); $userid = $user->id; -die(json_encode(["qr"=>getUser2FAQR($userid)])); \ No newline at end of file +die(json_encode(["qr"=>getUser2FAQR($userid),"secret"=>getUser2FASecret($userid)])); \ No newline at end of file