UNPKG

@sexycoders/libauth.js

Version:

A full service for asymetric passwordless authentication.

34 lines (33 loc) 1.12 kB
function Verify() { var data=new Object(); data.code=($('form').serializeArray()[0].value); console.log(data); //var ssh_pass=new Object(); //ssh_pass.password=data.password; //await ssh_create(ssh_pass); //ssh_create(ssh_pass); var json_send=new Object(); json_send.command="verify_email"; json_send.user=new Object(); json_send.user.id=window.__auth_system.user; json_send.user.code=data.code; json_send.user.RSA=window.__auth_system._rsa; json_send.user.pRSA=window.__auth_system._enc_prsa; console.log(json_send); console.log("Json Is: "+JSON.stringify(json_send)); json_send=btoa(JSON.stringify(json_send)); $.ajax({ type: 'POST', headers: {"Access-Control-Allow-Origin":"localhost:56083"}, url: window.__auth_system.auth_server, data: json_send, success: function(response) { alert("Registration Complete!\nYou can now login!"); ResetToLogin(); }, async:false }); }