fix Registrazione data

fix linkref
fix controllo login
This commit is contained in:
Paolo Arena
2020-01-20 01:48:25 +01:00
parent e23a3a792e
commit 6dcaea5f1c
21 changed files with 779 additions and 171 deletions

View File

@@ -9,8 +9,12 @@ function toHexString(bytes) {
module.exports = {
getlinkregByEmail: function (idapp, email, username) {
try{
mystr = idapp + email + username;
return jwt.sign(toHexString(mystr), process.env.SIGNCODE).toString();
myobj = {
idapp,
email,
username
};
return jwt.sign(myobj, process.env.SIGNCODE).toString().substring(0, 180);
} catch (e) {
console.error(e);
}