Skip to content

Commit

Permalink
Supress redirect error
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasHirt committed Feb 19, 2021
1 parent 7b91e3d commit ed31c83
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 ed31c83

Please sign in to comment.