Skip to content

Commit

Permalink
Merge pull request #4759 from owncloud/surpress-redirect-error
Browse files Browse the repository at this point in the history
Supress redirect error
  • Loading branch information
Lukas Hirt committed Feb 19, 2021
2 parents 7b91e3d + ed31c83 commit 91dc7ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions changelog/unreleased/surpress-redirect-error
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion packages/web-runtime/src/store/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 91dc7ec

Please sign in to comment.