Skip to content

Commit 2ca7f56

Browse files
authored
fix(sso) - Add redirect_uri to authenticate route on 401 error (#8346)
1 parent 564d8a3 commit 2ca7f56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datahub-web-react/src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const errorLink = onError((error) => {
4848
if (serverError.statusCode === 401) {
4949
isLoggedInVar(false);
5050
Cookies.remove(GlobalCfg.CLIENT_AUTH_COOKIE);
51-
window.location.replace(PageRoutes.AUTHENTICATE);
51+
const currentPath = window.location.pathname + window.location.search;
52+
window.location.replace(`${PageRoutes.AUTHENTICATE}?redirect_uri=${encodeURIComponent(currentPath)}`);
5253
}
5354
}
5455
if (graphQLErrors && graphQLErrors.length) {

0 commit comments

Comments
 (0)