Set oauth timeout to 5 years

OAuth refresh not working so setting token timeout to 5 years
This commit is contained in:
Ben Hardill
2017-02-13 17:53:24 +00:00
parent 3ed62d012a
commit c78002c1d4
3 changed files with 8 additions and 3 deletions

View File

@@ -71,7 +71,12 @@ console.log(mongo_url);
var mongoose_options = {
server: {
auto_reconnect:true,
reconnectTries: Number.MAX_VALUE
autoReconnect: true,
reconnectTries: Number.MAX_VALUE,
reconnectInterval: 1000,
socketOptions: {
autoReconnect: true
}
}
};
var mongoose_connection = mongoose.connection;

View File

@@ -2,4 +2,4 @@
application:
- name: alexa-node-red
memory: 128M
host: alexa-node-red
host: alexa-node-red

View File

@@ -35,7 +35,7 @@ var AccessTokenSchema = new Schema({
scope: [ { type: String }],
expires: { type: Date, default: function(){
var today = new Date();
var length = 60 * 24 * 90; // Length (in minutes) of our access token
var length = 60 * 24 * 365 * 5; // Length (in minutes) of our access token
return new Date(today.getTime() + length*60000);
} },
active: { type: Boolean, get: function(value) {