mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #1349 from Human-Connection/fix_expiration_dates
Fix expiration dates of JWT and cookie
This commit is contained in:
commit
8eeef1f68d
@ -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(),
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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) {},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user