mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2025-04-14 01:16:30 +02:00
Merge branch 'Dan6erbond:main' into main
This commit is contained in:
commit
ff96c17a3a
@ -1,4 +1,4 @@
|
||||
function mergePath(basePaths: (string | null)[], path: string) {
|
||||
export function mergePath(basePaths: (string | null)[], path: string) {
|
||||
if (path.startsWith("/")) {
|
||||
path = path.slice(1);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { page } from "@sveltejs/kit/assets/runtime/app/stores"; */
|
||||
import type { LoadInput } from "@sveltejs/kit";
|
||||
import type { ClientRequestConfig } from "./types";
|
||||
import { mergePath } from "./helpers";
|
||||
|
||||
interface SignInConfig extends ClientRequestConfig {
|
||||
redirectUrl?: string;
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* import { session as session$ } from "$app/stores"; */
|
||||
|
||||
import type { ClientRequestConfig } from "./types";
|
||||
import { mergePath } from "./helpers";
|
||||
|
||||
export async function signOut(config?: ClientRequestConfig) {
|
||||
let res = await fetch(mergePath(["/api/auth", config?.basePath ?? null], "signout"), {
|
||||
|
Loading…
Reference in New Issue
Block a user