Files
geovisio-website/src/utils/auth.ts

9 lines
274 B
TypeScript

function getAuthRoute(authRoute: string, nextRoute: string): string {
const next = `${location.protocol}//${location.host}${nextRoute}`
return `${
import.meta.env.VITE_API_URL
}api/${authRoute}?next_url=${encodeURIComponent(`${next}`)}`
}
export { getAuthRoute }