From 88785e836d9ed1f6a1002fc10bf8c3ea9fd3bc2f Mon Sep 17 00:00:00 2001 From: Wietse Wind Date: Tue, 16 May 2023 14:35:57 +0200 Subject: [PATCH] Fix expired JWT auth fail pre refresh --- src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index a9eb852..4b713e8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -427,7 +427,11 @@ export class XummPkceThread extends EventEmitter { this.resolved = false; - await this.ping + try { + await this.ping + } catch (e) { + // Nope (prevent 401 error from API to bleed into auth flow) + } if (!this.mobileRedirectFlow && !this.autoResolvedFlow) { const url = this.authorizeUrl();