This demo app will show you how user authentication works with Syncano. To use this app, you'll need to create an instance in your Syncano Dashboard. Enter your Account Key and Instance Name in the fields below, and you'll be able to create and login users.
Type a username and password below to register a new user. This form is utilizing Syncano's Javascript library like this:
var connection = new Syncano({accountKey: accountKey});
connection.User.please().create({username: username, password: password, instanceName: instanceName})
.then(function(response) {
// do something with the response
})
.catch(function(error) {
console.log(error);
});
Enter your registered username and password below to login. This is called with the following code:
connection.User.please().login({instanceName: instanceName}, {username: username, password: password})
.then(function(response) {
// do something with response
})
.catch(function(error) {
console.log(error);
});