Skip to content

Instantly share code, notes, and snippets.

@kyhwana
Created January 23, 2018 23:52
Show Gist options
  • Save kyhwana/bdbbc35532d264143dcbe00e07b2c461 to your computer and use it in GitHub Desktop.
Save kyhwana/bdbbc35532d264143dcbe00e07b2c461 to your computer and use it in GitHub Desktop.
Authy 2.5.0_0 diff to show TOTP account secrets.
19316,19317d19315
< }, d.prototype.getSharedSecret = function() {
< return this.isEncrypted() ? "?" : this.decryptedSeed
26333,26337d26330
< }), f(".copysecret").click(function (t) {
< var n, r, o;
< return n = f(this), o = function () {
< return n.text("Copy Secret")
< }, r = n.parent().find(".sharedSecret")[0], e.onCopyClicked(r), n.text("Copied secret"), setTimeout(o, 1e3)
26378,26380c26371
< for (s = [], o = 0, i = t.length; o < i; o++) a = t[o], r = f(a), e = n.get().find(r.attr("data-token-id")), r.find(".tokenCode").html(e.formatToken()(e.getOtp())), s.push(r.find(".tokenCodeString").html(e.getOtp()));
< for (s = [], o = 0, i = t.length; o < i; o++) a = t[o], r = f(a), e = n.get().find(r.attr("data-token-id")), r.find(".sharedSecret").html(e.formatToken()(e.getSharedSecret())), s.push(r.find(".sharedSecret").html(e.getSharedSecret()));
<
---
> for (s = [], o = 0, i = t.length; o < i; o++) a = t[o], r = f(a), e = n.get().find(r.attr("data-token-id")), r.find(".tokenCode").html(e.formatToken()(e.getOtp())), s.push(r.find(".tokenCodeString").html(e.getOtp()));
26426c26417
< t.exports = '<div class="tokens-screen">\n\n {{> navbar}}\n\n {{> tokens_navbar}}\n\n <div id="tokens-view" class="container">\n {{#apps}}\n {{! This will be rendered if the app is decrypted}}\n {{#isDecrypted}}\n <div class="row token" data-token-id={{getId}} id="token-{{getId}}">\n <div class="small-3 columns">\n <div class="tokenLogoFrame">\n <img src="{{getMenuImage}}" alt="">\n </div>\n </div>\n <div class="small-9 columns">\n <div class="tokenFrame">\n <p>{{getName}}</p>\n </div>\n <div class="tokenFrameSelected">\n <p>\n <span class="tokenCode">{{# formatToken }}{{ getOtp }}{{/ formatToken }}</span><br>\n <span class="tokenCodeString">{{ getOtp }}</span><br>\n <span class="sharedSecret">{{ getSharedSecret }}</span>\n <span class="tokenTimeRemaining">Expires in <span class="labelSecondsRemaining">{{timeRemaining}}</span> seconds</span>\n </p>\n <button class="button-copy copy">Copy</button>\n <button class="button-copy copysecret">Copy secret</button>\n </div>\n <div class="tokenFramePhishingAlert">\n <p>\n <img src="/img/alert_icon.png">Phishing Alert\n </p>\n <button class="button-blue showAnyway">Show token anyway</button>\n </div>\n </div>\n </div>\n {{/isDecrypted}}\n\n {{! This will be rendered if the app is encrypted}}\n {{^isDecrypted}}\n <div class="token" data-token-id={{getId}} id="token-{{getId}}">\n <div class="row">\n <div class="small-3 columns">\n <div class="tokenLogoFrame">\n <img src="{{getMenuImage}}" alt="">\n </div>\n </div>\n <div class="small-9 columns">\n <div class="tokenFrame">\n <p class="encrypted">{{getName}}</p>\n <img class="encryptedLogo" src="img/tokens-screen/encrypted_icon.png">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="tokenEncrypted">\n <p class="labelEncrypted">This account is encrypted</p>\n <p class="labelPromptPassword">Enter your backups password</p>\n <div id="passwordDecryptAccounts">\n <input type="password" class="holo" data-password-label>\n <div id="borderInputDecryptAccounts"></div>\n </div>\n <button class="button-decrypt">Decrypt Account</button>\n </div>\n </div>\n </div>\n {{/isDecrypted}}\n {{/apps}}\n {{! This will be rendered if there are no apps}}\n {{^apps}}\n <div class="no-apps-screen" >\n <div class="inner">\n <div class="noAppsLabel">\n You don\'t have any accounts. Add your first\n </div>\n <div class="noAppsAddLogo">\n <img id="btnAddApp" src="img/tokens-screen/add_btn.png" alt="">\n </div>\n </div>\n </div>\n {{/apps}}\n </div>\n</div>\n';
---
> t.exports = '<div class="tokens-screen">\n\n {{> navbar}}\n\n {{> tokens_navbar}}\n\n <div id="tokens-view" class="container">\n {{#apps}}\n {{! This will be rendered if the app is decrypted}}\n {{#isDecrypted}}\n <div class="row token" data-token-id={{getId}} id="token-{{getId}}">\n <div class="small-3 columns">\n <div class="tokenLogoFrame">\n <img src="{{getMenuImage}}" alt="">\n </div>\n </div>\n <div class="small-9 columns">\n <div class="tokenFrame">\n <p>{{getName}}</p>\n </div>\n <div class="tokenFrameSelected">\n <p>\n <span class="tokenCode">{{# formatToken }}{{ getOtp }}{{/ formatToken }}</span><br>\n <span class="tokenCodeString">{{ getOtp }}</span>\n <span class="tokenTimeRemaining">Expires in <span class="labelSecondsRemaining">{{timeRemaining}}</span> seconds</span>\n </p>\n <button class="button-copy copy">Copy</button>\n </div>\n <div class="tokenFramePhishingAlert">\n <p>\n <img src="/img/alert_icon.png">Phishing Alert\n </p>\n <button class="button-blue showAnyway">Show token anyway</button>\n </div>\n </div>\n </div>\n {{/isDecrypted}}\n\n {{! This will be rendered if the app is encrypted}}\n {{^isDecrypted}}\n <div class="token" data-token-id={{getId}} id="token-{{getId}}">\n <div class="row">\n <div class="small-3 columns">\n <div class="tokenLogoFrame">\n <img src="{{getMenuImage}}" alt="">\n </div>\n </div>\n <div class="small-9 columns">\n <div class="tokenFrame">\n <p class="encrypted">{{getName}}</p>\n <img class="encryptedLogo" src="img/tokens-screen/encrypted_icon.png">\n </div>\n </div>\n </div>\n <div class="row">\n <div class="tokenEncrypted">\n <p class="labelEncrypted">This account is encrypted</p>\n <p class="labelPromptPassword">Enter your backups password</p>\n <div id="passwordDecryptAccounts">\n <input type="password" class="holo" data-password-label>\n <div id="borderInputDecryptAccounts"></div>\n </div>\n <button class="button-decrypt">Decrypt Account</button>\n </div>\n </div>\n </div>\n {{/isDecrypted}}\n {{/apps}}\n {{! This will be rendered if there are no apps}}\n {{^apps}}\n <div class="no-apps-screen" >\n <div class="inner">\n <div class="noAppsLabel">\n You don\'t have any accounts. Add your first\n </div>\n <div class="noAppsAddLogo">\n <img id="btnAddApp" src="img/tokens-screen/add_btn.png" alt="">\n </div>\n </div>\n </div>\n {{/apps}}\n </div>\n</div>\n';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment