If you are using Javascript to show a login or registration modal, and you would like to first show the registration screen instead of the login screen, you can use the following code:
tp = window.tp || [];
tp.push(["init", function() {
tp.pianoId.show({
screen: 'register',
loggedIn: function(data) {
console.log('user ', data.user, ' logged in with token', data.token);
},
loggedOut: function() {
console.log('user logged out');
}
});
}]);
If you'd like to show the login screen, you can use the following code:
tp = window.tp || [];
tp.push(["init", function() {
tp.pianoId.show({
screen: 'login',
loggedIn: function(data) {
console.log('user ', data.user, ' logged in with token', data.token);
},
loggedOut: function() {
console.log('user logged out');
}
});
}]);