From ed31c83b7b35d90d23812af2c3b601b430d7a698 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Fri, 19 Feb 2021 10:26:25 +0100 Subject: [PATCH] Supress redirect error --- changelog/unreleased/surpress-redirect-error | 9 +++++++++ packages/web-runtime/src/store/user.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/surpress-redirect-error diff --git a/changelog/unreleased/surpress-redirect-error b/changelog/unreleased/surpress-redirect-error new file mode 100644 index 00000000000..2613cd04871 --- /dev/null +++ b/changelog/unreleased/surpress-redirect-error @@ -0,0 +1,9 @@ +Change: Suppress redirect error during authorization + +We've suppressed the error appearing in the console which warned about redirect happening after the oidc callback page. +This error is being shown because after the oidc callback has successfully processed the authorization request we are redirecting to the `/` path which immediately does another redirect to the extension set as default one. +In the context of Vue router, this is considered an error even though for us it is a valid use case. +The error is only informative thus no issue is going to surface if we suppress it. +This way we are getting closer to a clean console without errors. + +https://github.com/owncloud/web/pull/4759 \ No newline at end of file diff --git a/packages/web-runtime/src/store/user.js b/packages/web-runtime/src/store/user.js index 837aeddacbc..f7b1b2660a9 100644 --- a/packages/web-runtime/src/store/user.js +++ b/packages/web-runtime/src/store/user.js @@ -111,7 +111,7 @@ const actions = { context.commit('SET_USER_READY', true) if (payload.autoRedirect) { - router.push({ path: '/' }) + router.push({ path: '/' }).catch(() => {}) } } else { context.commit('UPDATE_TOKEN', token)