Skip to content

Commit fe2791f

Browse files
committed
Remove trailing slash from baseURL & basePath
1 parent 589c6e2 commit fe2791f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/auth-ui-provider.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ export const AuthUIProvider = ({
359359
return { ...defaultMutators, ...mutatorsProp } as AuthMutators
360360
}, [defaultMutators, mutatorsProp])
361361

362+
// Remove trailing slash from baseURL
363+
baseURL = baseURL.endsWith("/") ? baseURL.slice(0, -1) : baseURL
364+
365+
// Remove trailing slash from basePath
366+
basePath = basePath.endsWith("/") ? basePath.slice(0, -1) : basePath
367+
362368
return (
363369
<AuthUIContext.Provider
364370
value={{

0 commit comments

Comments
 (0)