File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ export function strip(pathname: string) {
9191export function route ( locale : Locale , pathname : string ) {
9292 const next = strip ( pathname )
9393 if ( next . startsWith ( "/docs" ) ) return next
94+ if ( next . startsWith ( "/auth" ) ) return next
95+ if ( next . startsWith ( "/workspace" ) ) return next
9496 if ( locale === "en" ) return next
9597 if ( next === "/" ) return `/${ locale } `
9698 return `/${ locale } ${ next } `
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { redirect } from "@solidjs/router"
22import type { APIEvent } from "@solidjs/start/server"
33import { AuthClient } from "~/context/auth"
44import { useAuthSession } from "~/context/auth"
5- import { fromPathname , localeFromRequest , route } from "~/lib/language"
5+ import { localeFromRequest , route } from "~/lib/language"
66
77export async function GET ( input : APIEvent ) {
88 const url = new URL ( input . request . url )
@@ -31,7 +31,6 @@ export async function GET(input: APIEvent) {
3131 }
3232 } )
3333 const next = url . pathname === "/auth/callback" ? "/auth" : url . pathname . replace ( "/auth/callback" , "" )
34- if ( fromPathname ( next ) ) return redirect ( next )
3534 return redirect ( route ( locale , next ) )
3635 } catch ( e : any ) {
3736 return new Response (
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ export async function GET(input: APIEvent) {
99 const workspaceID = await getLastSeenWorkspaceID ( )
1010 return redirect ( route ( locale , `/workspace/${ workspaceID } ` ) )
1111 } catch {
12- const cont = route ( locale , "/auth" )
13- if ( cont === "/auth" ) return redirect ( "/auth/authorize" )
14- return redirect ( `/auth/authorize?continue=${ encodeURIComponent ( cont ) } ` )
12+ return redirect ( "/auth/authorize" )
1513 }
1614}
You can’t perform that action at this time.
0 commit comments