Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function registerAjax(e) {
- e.preventDefault();
- let userData = {
- username: $("#username").val(),
- password: $("#password").val(),
- };
- $.ajax({
- method: "POST",
- url: kinveyBaseUrl + "user/" + kinveyAppKey + "/",
- headers: kinveyAppAuthHeaders,
- data: userData,
- success: registerSuccess,
- error: handleAjaxError
- });
- function registerSuccess(userInfo) {
- saveAuthInSession(userInfo);
- showInfo('User registration successful.');
- }
- function registerUser() {
- registerAjax();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement