]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/commitdiff
Set session expire to 7 days. v0.0.4
authorjloup <jeanloup.jamet@gmail.com>
Mon, 16 Apr 2018 07:56:19 +0000 (09:56 +0200)
committerjloup <jeanloup.jamet@gmail.com>
Mon, 16 Apr 2018 07:56:19 +0000 (09:56 +0200)
api/auth_jwt.go
cmd/web/js/app.js

index f713f4e9be9ef710da6f14e881a6db5f85a67c24..5ce159369a89180650aa706bf65db1d3290a5d16 100644 (file)
@@ -61,7 +61,7 @@ func CreateJwtToken(userId int64) (string, error) {
                false,
                userId,
                jwt.StandardClaims{
-                       ExpiresAt: time.Now().Add(time.Hour * 24).Unix(),
+                       ExpiresAt: time.Now().Add(time.Hour * 24 * 7).Unix(),
                },
        }
 
index d8189e08f0e17822ee6e5d14cef332295b0f6bad..5ac433582c29f5421690bd6d581f95fba5752d0e 100644 (file)
@@ -6,7 +6,7 @@ import React from 'react';
 import ReactDOM from 'react-dom';
 
 var App = {};
-var cookieExpire = 60 * 30;
+var cookieExpire = 60 * 60 * 7;
 
 App.errorCodeToMessage = function(code) {
   switch (code) {