MCPcopy
hub / github.com/CapSoftware/Cap / redirectToLogin

Function redirectToLogin

packages/web-backend/src/Extension/Http.ts:69–73  ·  view source on GitHub ↗
(nextUrl: URL)

Source from the content-addressed store, hash-verified

67 });
68
69const redirectToLogin = (nextUrl: URL) => {
70 const loginUrl = new URL("/login", serverEnv().WEB_URL);
71 loginUrl.searchParams.set("next", nextUrl.toString());
72 return HttpServerResponse.redirect(loginUrl);
73};
74
75// Rebuilds the consent-page URL from the current request so an expired
76// session can restart the flow after login. Resolved as a sibling of the

Callers 1

Http.tsFile · 0.85

Calls 1

serverEnvFunction · 0.90

Tested by

no test coverage detected