INNER CODE UNIT · TypeScript

getSafeRedirectURL

octelium/octelium · cluster/authserver/authserver/web/package/src/utils/index.ts:54

export const getSafeRedirectURL = (value: string): string => {
  const url = new URL(value, window.location.origin);
  if (url.protocol !== "http:" && url.protocol !== "https:") {
    throw new Error("Unsupported redirect URL protocol");
  }
  return value;
};

export const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      staleTime: 30000,
    },
  },
});

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…