Support » Plugin: Google Authenticator » Could you explain the operation

  • Resolved barros-word

    (@barros-word)


    Hello
    Could you explain the operation of

    jQuery(‘#GA_newsecret’).bind(‘click’, function() {
    var data=new Object();
    data[‘action’] = ‘GoogleAuthenticator_action’;
    data[‘nonce’] = GAnonce;
    jQuery.post(ajaxurl, data, function(response) {
    jQuery(‘#GA_secret’).val(response[‘new-secret’]);
    chl=escape(“otpauth://totp/”+jQuery(‘#GA_description’).val()+”?secret=”+jQuery(‘#GA_secret’).val());
    qrcodeurl=”https://chart.googleapis.com/chart?cht=qr&chs=300×300&chld=H|0&chl=”+chl;
    jQuery(‘#GA_QRCODE’).attr(‘src’,qrcodeurl);
    jQuery(‘#GA_QR_INFO’).show(‘slow’);
    });
    });

    I want to apply this same process on another website without wordpress

    http://wordpress.org/plugins/google-authenticator/

Viewing 1 replies (of 1 total)
  • Matt

    (@slammeddime)

    It performs an AJAX request to the plugin’s backend to generate a new secret code. It then fills a form field with that value and generates a scannable QR code with Google’s Chart API.

Viewing 1 replies (of 1 total)
  • The topic ‘Could you explain the operation’ is closed to new replies.