{"id":18,"date":"2026-11-25T22:22:36","date_gmt":"2026-11-25T15:22:36","guid":{"rendered":"https:\/\/tinhte86.com\/en\/2fa\/"},"modified":"2026-11-25T22:22:36","modified_gmt":"2026-11-25T15:22:36","slug":"2fa","status":"publish","type":"page","link":"https:\/\/tinhte86.com\/en\/2fa\/","title":{"rendered":"Online 6-Digit 2FA Code Generator (TOTP)"},"content":{"rendered":"        <div class=\"hm-tool-card hm-2fa-studio\">\n            <div class=\"hm-tool-badge\">100% CLIENT-SIDE BROWSER SECURITY \u00b7 ZERO SERVER STORAGE<\/div>\n            <h2>Online 6-Digit 2FA Code Generator (TOTP)<\/h2>\n            <p class=\"hm-tool-lead\">Paste your <strong>Base32 2FA Secret Key<\/strong> from your TinhTe86 delivery email below to instantly generate your live 6-digit verification code (compatible with Coursera Plus, SaaS apps, and any RFC 6238 two-factor authentication account).<\/p>\n\n            <div class=\"hm-2fa-input-group\">\n                <label for=\"hm-totp-secret\">2FA Secret Key (Base32)<\/label>\n                <input type=\"text\" id=\"hm-totp-secret\" value=\"\" placeholder=\"e.g., JBSWY3DPEHPK3PXP...\" autocomplete=\"off\" spellcheck=\"false\">\n            <\/div>\n\n            <div class=\"hm-2fa-output-box\">\n                <div class=\"hm-2fa-code-area\">\n                    <span class=\"hm-2fa-timer-label\">Current 6-digit code \u00b7 Auto-refreshes in <b id=\"hm-totp-countdown\">30<\/b>s<\/span>\n                    <div class=\"hm-2fa-digits\" id=\"hm-totp-code\">--- ---<\/div>\n                    <div class=\"hm-2fa-progress\"><div class=\"hm-2fa-progress-bar\" id=\"hm-totp-bar\"><\/div><\/div>\n                <\/div>\n                <button type=\"button\" class=\"hm-btn-copy-2fa\" id=\"hm-totp-copy\">\n                    <svg viewBox=\"0 0 24 24\" width=\"18\" height=\"18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"\/><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\/><\/svg>\n                    <span>Copy 6-Digit Code<\/span>\n                <\/button>\n            <\/div>\n\n            <div class=\"hm-tool-tips\">\n                <h3>Important Tips for 2FA-Protected Accounts<\/h3>\n                <ul>\n                    <li><strong>100% Local Browser Computation:<\/strong> Your 6-digit OTP is calculated directly inside your browser via WebCrypto <code>RFC 6238 HMAC-SHA1<\/code> \u2014 your secret key never leaves your device.<\/li>\n                    <li><strong>Quick Login Tip:<\/strong> If the countdown timer has fewer than <strong>4 seconds<\/strong> remaining, wait for the next 30-second cycle before clicking <em>Copy 6-Digit Code<\/em> so it does not expire while switching tabs.<\/li>\n                    <li><strong>Pre-Configured Account Warranty Rules:<\/strong> For pre-configured 1-on-1 accounts (such as Coursera Plus), you may freely change the account password (please save your new password securely), but <strong>do not change the login email address and do not remove 2FA<\/strong>.<\/li>\n                <\/ul>\n            <\/div>\n        <\/div>\n        <script>\n        (function(){\n            var alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';\n            var input = document.getElementById('hm-totp-secret');\n            var codeEl = document.getElementById('hm-totp-code');\n            var timerEl = document.getElementById('hm-totp-countdown');\n            var barEl = document.getElementById('hm-totp-bar');\n            var copyBtn = document.getElementById('hm-totp-copy');\n            var currentRawCode = '';\n\n            function base32ToBytes(b32) {\n                var clean = (b32 || '').toUpperCase().replace(\/[^A-Z2-7]\/g, '');\n                var bits = '';\n                for (var i = 0; i < clean.length; i++) {\n                    bits += alphabet.indexOf(clean[i]).toString(2).padStart(5, '0');\n                }\n                var bytes = new Uint8Array(Math.floor(bits.length \/ 8));\n                for (var j = 0; j < bytes.length; j++) {\n                    bytes[j] = parseInt(bits.slice(j * 8, j * 8 + 8), 2);\n                }\n                return bytes;\n            }\n\n            async function computeCode() {\n                var epoch = Math.floor(Date.now() \/ 1000);\n                var rem = 30 - (epoch % 30);\n                if (timerEl) timerEl.textContent = String(rem);\n                if (barEl) barEl.style.width = ((rem \/ 30) * 100).toFixed(1) + '%';\n\n                var secret = input ? input.value.trim() : '';\n                var keyBytes = base32ToBytes(secret);\n                if (!keyBytes.length || !window.crypto || !window.crypto.subtle) {\n                    currentRawCode = '';\n                    if (codeEl) codeEl.textContent = '--- ---';\n                    return;\n                }\n                try {\n                    var counter = Math.floor(epoch \/ 30);\n                    var buf = new ArrayBuffer(8);\n                    var view = new DataView(buf);\n                    for (var i = 7; i >= 0; i--) {\n                        view.setUint8(i, counter & 0xff);\n                        counter = Math.floor(counter \/ 256);\n                    }\n                    var cryptoKey = await window.crypto.subtle.importKey('raw', keyBytes, { name: 'HMAC', hash: 'SHA-1' }, false, ['sign']);\n                    var sig = new Uint8Array(await window.crypto.subtle.sign('HMAC', cryptoKey, buf));\n                    var offset = sig[sig.length - 1] & 0x0f;\n                    var binary = ((sig[offset] & 0x7f) << 24) | ((sig[offset + 1] & 0xff) << 16) | ((sig[offset + 2] & 0xff) << 8) | (sig[offset + 3] & 0xff);\n                    var otp = String(binary % 1000000).padStart(6, '0');\n                    currentRawCode = otp;\n                    if (codeEl) codeEl.textContent = otp.slice(0, 3) + ' ' + otp.slice(3);\n                } catch (e) {\n                    currentRawCode = '';\n                    if (codeEl) codeEl.textContent = '--- ---';\n                }\n            }\n\n            if (input) input.addEventListener('input', computeCode);\n            if (copyBtn) {\n                copyBtn.addEventListener('click', function(){\n                    if (!currentRawCode) return;\n                    if (navigator.clipboard) navigator.clipboard.writeText(currentRawCode);\n                    var span = copyBtn.querySelector('span');\n                    var old = span.textContent;\n                    span.textContent = 'Copied: ' + currentRawCode;\n                    setTimeout(function(){ span.textContent = old; }, 1800);\n                });\n            }\n            computeCode();\n            setInterval(computeCode, 1000);\n        })();\n        <\/script>\n        \n<h2>What Is a Base32 2FA Secret Key?<\/h2>\n<p>Two-Factor Authentication (TOTP, standardized under <code>RFC 6238<\/code>) protects online accounts by pairing your password with a rotating 6-digit verification code that refreshes every 30 seconds. Unlike SMS verification codes, our browser-based TOTP generator computes your 6-digit token locally inside your browser via WebCrypto \u2014 zero data is ever transmitted to or stored on any server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What Is a Base32 2FA Secret Key? Two-Factor Authentication (TOTP, standardized under RFC 6238) protects online accounts by pairing your password with a rotating 6-digit verification code that refreshes every 30 seconds. Unlike SMS verification codes, our browser-based TOTP generator computes your 6-digit token locally inside your browser via WebCrypto \u2014 zero data is ever [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"","rank_math_title":"Online 2FA Code Generator (6-Digit TOTP Authenticator) | TinhTe86","rank_math_description":"Free client-side 6-digit 2FA TOTP code generator. Paste your Base32 secret key to generate live 30-second verification codes securely in your browser.","rank_math_focus_keyword":"","_hm_seo_title":"Online 2FA Code Generator (6-Digit TOTP Authenticator) | TinhTe86","_hm_seo_desc":"Free client-side 6-digit 2FA TOTP code generator. Paste your Base32 secret key to generate live 30-second verification codes securely in your browser.","custom_schema_json":""},"class_list":["post-18","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tinhte86.com\/en\/wp-json\/wp\/v2\/pages\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tinhte86.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tinhte86.com\/en\/wp-json\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/tinhte86.com\/en\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":0,"href":"https:\/\/tinhte86.com\/en\/wp-json\/wp\/v2\/pages\/18\/revisions"}],"wp:attachment":[{"href":"https:\/\/tinhte86.com\/en\/wp-json\/wp\/v2\/media?parent=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}