Commit e66b3132 authored by pdg16's avatar pdg16
Browse files

expira tokens e arruma verificacao

parent f4c48538
Pipeline #19926 failed with stage
in 1 minute and 35 seconds
......@@ -13,19 +13,22 @@
"version" : "v1"
}
},
"dadoseducacionais": {
"dadoseducacionais": {
"url": "https://dadoseducacionaisdev.c3sl.ufpr.br/#"
},
"simcaq": {
"url": "https://simcaqdev.c3sl.ufpr.br/"
},
"lde_api": {
"url": "https://dadoseducacionaisdev.c3sl.ufpr.br/api/v1/"
},
"email": {
"port": 25,
"host": "mx.c3sl.ufpr.br",
"secure": false,
"ignoreTLS": true,
"from": "\"Laboratório de Dados Educacionais\" <lde@c3sl.ufpr.br>"
},
},
"security": {
"refresh_tokenLife": 86400,
"access_tokenLife": 86400
......@@ -45,20 +48,23 @@
"version" : "v1"
}
},
"dadoseducacionais": {
"dadoseducacionais": {
"url": "https://dadoseducacionaishom.c3sl.ufpr.br/#"
},
"simcaq": {
"url": "https://simcaqhom.c3sl.ufpr.br/"
},
"lde_api": {
"url": "https://dadoseducacionaishom.c3sl.ufpr.br/api/v1/"
},
"email": {
"port": 25,
"host": "mx.c3sl.ufpr.br",
"secure": false,
"ignoreTLS": true,
"from": "\"Laboratório de Dados Educacionais\" <lde@c3sl.ufpr.br>"
},
"security": {
},
"security": {
"refresh_tokenLife": 86400,
"access_tokenLife": 86400
}
......@@ -77,20 +83,23 @@
"version" : "v1"
}
},
"dadoseducacionais": {
"dadoseducacionais": {
"url": "https://dadoseducacionais.c3sl.ufpr.br/#"
},
"simcaq": {
"url": "https://simcaq.c3sl.ufpr.br/"
},
"lde_api": {
"url": "https://dadoseducacionais.c3sl.ufpr.br/api/v1/"
},
"email": {
"port": 25,
"host": "mx.c3sl.ufpr.br",
"secure": false,
"ignoreTLS": true,
"from": "\"Laboratório de Dados Educacionais\" <lde@c3sl.ufpr.br>"
},
"security": {
},
"security": {
"refresh_tokenLife": 86400,
"access_tokenLife": 86400
}
......
......@@ -48,7 +48,9 @@ let AccessToken = new Schema({
},
createdAt: {
type: Date,
default: Date.now
required: true,
default: Date.now,
expires: config.security.access_tokenLife
}
});
......
......@@ -43,7 +43,9 @@ let RefreshToken = new Schema({
},
createdAt: {
type: Date,
default: Date.now
required: true,
default: Date.now,
expires: config.security.refresh_tokenLife
}
});
......
......@@ -43,7 +43,8 @@ let ResetToken = new Schema({
createdAt: {
type: Date,
required: true,
default: Date.now
default: Date.now,
expires: 86400
}
});
......
......@@ -43,7 +43,7 @@ let VerificationToken = new Schema({
createdAt: {
type: Date,
required: true,
default: Date.now
default: Date.now,
}
});
......
......@@ -189,7 +189,7 @@ userApp.post('/', (req, res, next) => {
log.error(err);
return next(err);
}
let url = '/verify';
let url = config.dadoseducacionais.url+'/verify';
let text = `Olá, ${user.name}, seja bem vindo/a ao Laboratório de Dados Educacionais.\n\nClique neste link para confirmar sua conta: ${url}/${token}`;
// Send confirmation email
let mailOptions = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment