Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/store/lib/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function _internalExecute (resolve, reject, task, currentToken, currentCartId) {
if (config.users.autoRefreshTokens) {
_internalExecute(resolve, reject, task, currentToken, currentCartId) // retry
if (!global.$VS.userTokenInvalidateLock) {
if (global.$VS.userTokenInvalidateAttemptsCount > 100) {
if (global.$VS.userTokenInvalidateAttemptsCount > 20) {
console.error('Internal Application error while refreshing the tokens. Please clear the storage and refresh page.')
rootStore.dispatch('user/logout', { silent: true })
EventBus.$emit('modal-show', 'modal-signup')
Expand All @@ -55,7 +55,7 @@ function _internalExecute (resolve, reject, task, currentToken, currentCartId) {
action1: { label: i18n.t('OK'), action: 'close' }
})
} else {
console.info('Invalidation process in progress (autoRefreshTokens is set to true)')
console.info('Invalidation process in progress (autoRefreshTokens is set to true)', global.$VS.userTokenInvalidateAttemptsCount)
global.$VS.userTokenInvalidateLock = _.isNumber(global.$VS.userTokenInvalidateLock) ? global.$VS.userTokenInvalidateLock++ : 1
global.$VS.userTokenInvalidateAttemptsCount++
rootStore.dispatch('user/refresh').then((resp) => {
Expand Down