Skip to content

Commit

Permalink
[apache#1742] fix(web): fix oauth mode redirect (apache#1743)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Fix OAuth mode redirect.

### Why are the changes needed?

Fix: apache#1742

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

N/A
  • Loading branch information
ch3yne authored Jan 26, 2024
1 parent ec23b8d commit a542b57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/lib/provider/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const AuthProvider = ({ children }) => {

dispatch(setStoreVersion(''))
dispatch(setAuthToken(''))
router.push('/login')
router.push('/ui/login')
}

useEffect(() => {
Expand All @@ -64,7 +64,7 @@ const AuthProvider = ({ children }) => {
dispatch(setAuthToken(token))
dispatch(initialVersion())
} else {
router.replace('/login')
router.push('/ui/login')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion web/lib/utils/axios/checkStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function checkStatus(status: number, msg: string, errorMessageMode: Error
localStorage.removeItem('accessToken')
localStorage.removeItem('version')

Router().replace('/login')
Router().push('/ui/login')

break
case 403:
Expand Down

0 comments on commit a542b57

Please sign in to comment.