Skip to content

Commit

Permalink
Merge pull request #353 from ZIMkaRU/bugfix/fix-2fa-workflow
Browse files Browse the repository at this point in the history
Stop auth token refresh interval if auth error
  • Loading branch information
ezewer authored Feb 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 4b9ea88 + 212b423 commit 2a9db00
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion workers/loc.api/sync/authenticator/index.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ const {
ArgsParamsError
} = require('bfx-report/workers/loc.api/errors')
const {
isENetError
isENetError,
isAuthError
} = require('bfx-report/workers/loc.api/helpers')

const { serializeVal } = require('../dao/helpers')
@@ -1385,6 +1386,10 @@ class Authenticator {
authToken: prevAuthToken
})
} catch (err) {
if (isAuthError(err)) {
clearInterval(newAuthTokenRefreshInterval)
}

this.logger.debug(err)

await this.wsEventEmitterFactory()

0 comments on commit 2a9db00

Please sign in to comment.