WordPress.org

Ready to get started?Download WordPress

Forums

Google Authenticator
[resolved] Could you explain the operation (2 posts)

  1. barros-word
    Member
    Posted 1 year ago #

    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=300x300&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/

  2. SlammedDime
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.