Skip to content

Commit 36c8546

Browse files
authored
Merge pull request #1099 from pkarw/master
Refresh token attempts limit
2 parents 0b8fb03 + 88eb0a4 commit 36c8546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/store/lib/task.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function _internalExecute (resolve, reject, task, currentToken, currentCartId) {
4545
if (config.users.autoRefreshTokens) {
4646
_internalExecute(resolve, reject, task, currentToken, currentCartId) // retry
4747
if (!global.$VS.userTokenInvalidateLock) {
48-
if (global.$VS.userTokenInvalidateAttemptsCount > 100) {
48+
if (global.$VS.userTokenInvalidateAttemptsCount > 20) {
4949
console.error('Internal Application error while refreshing the tokens. Please clear the storage and refresh page.')
5050
rootStore.dispatch('user/logout', { silent: true })
5151
EventBus.$emit('modal-show', 'modal-signup')
@@ -55,7 +55,7 @@ function _internalExecute (resolve, reject, task, currentToken, currentCartId) {
5555
action1: { label: i18n.t('OK'), action: 'close' }
5656
})
5757
} else {
58-
console.info('Invalidation process in progress (autoRefreshTokens is set to true)')
58+
console.info('Invalidation process in progress (autoRefreshTokens is set to true)', global.$VS.userTokenInvalidateAttemptsCount)
5959
global.$VS.userTokenInvalidateLock = _.isNumber(global.$VS.userTokenInvalidateLock) ? global.$VS.userTokenInvalidateLock++ : 1
6060
global.$VS.userTokenInvalidateAttemptsCount++
6161
rootStore.dispatch('user/refresh').then((resp) => {

0 commit comments

Comments
 (0)