Merge pull request #1349 from Human-Connection/fix_expiration_dates

Fix expiration dates of JWT and cookie
This commit is contained in:
mattwr18 2019-08-23 08:27:09 +02:00 committed by GitHub
commit 8eeef1f68d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -4,7 +4,7 @@ import CONFIG from './../config'
// Generate an Access Token for the given User ID
export default function encode(user) {
const token = jwt.sign(user, CONFIG.JWT_SECRET, {
expiresIn: 24 * 60 * 60 * 1000, // one day
expiresIn: '1d',
issuer: CONFIG.GRAPHQL_URI,
audience: CONFIG.CLIENT_URI,
subject: user.id.toString(),

View File

@ -271,7 +271,7 @@ module.exports = {
apollo: {
tokenName: 'human-connection-token', // optional, default: apollo-token
cookieAttributes: {
expires: 3, // optional, default: 7 (days)
expires: 1, // optional, default: 7 (days)
},
// includeNodeModules: true, // optional, default: false (this includes graphql-tag for node_modules folder)

View File

@ -144,10 +144,4 @@ export const actions = {
commit('SET_TOKEN', null)
return this.app.$apolloHelpers.onLogout()
},
register({ dispatch, commit }, { email, password, inviteCode, invitedByUserId }) {},
async patch({ state, commit, dispatch }, data) {},
resendVerifySignup({ state, dispatch }) {},
resetPassword({ state }, data) {},
setNewPassword({ state }, data) {},
}