MCPcopy Create free account
hub / github.com/bytebase/bytebase / buildSigninRedirectQuery

Function buildSigninRedirectQuery

frontend/src/react/router/guard.ts:66–79  ·  view source on GitHub ↗
(url: URL)

Source from the content-addressed store, hash-verified

64}
65
66export function buildSigninRedirectQuery(url: URL): Record<string, string> {
67 const query: Record<string, string> = {};
68 // Forward signin-only query params (consumed by the signin page).
69 for (const param of SIGNIN_QUERY_PARAMS) {
70 const value = url.searchParams.get(param);
71 if (value) query[param] = value;
72 }
73 const fullPath = url.pathname + url.search + url.hash;
74 // Set redirect if not root and not already set; strip signin-only params.
75 if (fullPath !== "/" && !url.searchParams.get("redirect")) {
76 query["redirect"] = stripSigninQueryParams(fullPath);
77 }
78 return query;
79}
80
81// Route-name prefixes that an authenticated user may always access.
82const ALLOWED_ROUTE_PATTERNS = [

Callers 3

AuthGateFunction · 0.90
guard.test.tsFile · 0.90
rootGuardFunction · 0.85

Calls 2

stripSigninQueryParamsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected