(logoutParams: {
apiClient: SelfManagedApiClient;
error?: string;
})
| 102 | } |
| 103 | |
| 104 | export async function logoutAndRedirect(logoutParams: { |
| 105 | apiClient: SelfManagedApiClient; |
| 106 | error?: string; |
| 107 | }) { |
| 108 | logout(logoutParams); |
| 109 | const url = logoutParams.error |
| 110 | ? `${LOGIN_PATH}?${new URLSearchParams({ [LOGIN_ERROR_PARAM]: logoutParams.error }).toString()}` |
| 111 | : LOGIN_PATH; |
| 112 | window.location.href = url; |
| 113 | } |
| 114 | |
| 115 | export async function logoutAndRedirectOrThrow() { |
| 116 | logout({ apiClient: getApiClient() }); |
no test coverage detected