MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / logoutAndRedirect

Function logoutAndRedirect

console/src/api/materialize/auth.ts:104–113  ·  view source on GitHub ↗
(logoutParams: {
  apiClient: SelfManagedApiClient;
  error?: string;
})

Source from the content-addressed store, hash-verified

102}
103
104export 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
115export async function logoutAndRedirectOrThrow() {
116 logout({ apiClient: getApiClient() });

Callers 1

Calls 1

logoutFunction · 0.85

Tested by

no test coverage detected