mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2025-07-11 13:47:47 +02:00
Fix breaking changes
This commit is contained in:
parent
19bff9a39c
commit
ed66d383b1
@ -1,17 +1,3 @@
|
|||||||
import type { Handle } from "@sveltejs/kit";
|
|
||||||
import { appAuth } from "$lib/appAuth";
|
import { appAuth } from "$lib/appAuth";
|
||||||
|
|
||||||
export const handle: Handle = async ({ event, resolve }) => {
|
|
||||||
// TODO https://github.com/sveltejs/kit/issues/1046
|
|
||||||
|
|
||||||
|
|
||||||
if (event.request.query.has("_method")) {
|
|
||||||
event.request.method = event.request.query.get("_method").toUpperCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await resolve(event);
|
|
||||||
|
|
||||||
return response;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const { getSession } = appAuth;
|
export const { getSession } = appAuth;
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"rounded-full",
|
"rounded-full",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{#if $page.path === "/profile"}
|
{#if $page.url.pathname === "/profile"}
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
class={clsx("h-6", "w-6")}
|
class={clsx("h-6", "w-6")}
|
||||||
@ -118,7 +118,7 @@
|
|||||||
"p-2",
|
"p-2",
|
||||||
"rounded-full",
|
"rounded-full",
|
||||||
)}
|
)}
|
||||||
class:text-orange-500={$page.path === "/login"}
|
class:text-orange-500={$page.url.pathname === "/login"}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
@ -9,11 +9,6 @@ const config = {
|
|||||||
postcss: true,
|
postcss: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
kit: {
|
|
||||||
// hydrate the <div id="svelte"> element in src/app.html
|
|
||||||
target: "#svelte",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import type { GetSession, RequestHandler } from "@sveltejs/kit";
|
import type { GetSession, RequestHandler } from "@sveltejs/kit";
|
||||||
import type { EndpointOutput } from "@sveltejs/kit/types/endpoint";
|
import type { EndpointOutput, RequestEvent } from "@sveltejs/kit";
|
||||||
import { RequestEvent } from "@sveltejs/kit/types/hooks";
|
|
||||||
import cookie from "cookie";
|
import cookie from "cookie";
|
||||||
import * as jsonwebtoken from "jsonwebtoken";
|
import * as jsonwebtoken from "jsonwebtoken";
|
||||||
import type { JWT, Session } from "./interfaces";
|
import type { JWT, Session } from "./interfaces";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import type { EndpointOutput } from "@sveltejs/kit";
|
import type { EndpointOutput, RequestEvent } from "@sveltejs/kit";
|
||||||
import { RequestEvent } from "@sveltejs/kit/types/hooks";
|
|
||||||
import type { Auth } from "../auth";
|
import type { Auth } from "../auth";
|
||||||
import type { CallbackResult } from "../types";
|
import type { CallbackResult } from "../types";
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import type { EndpointOutput } from "@sveltejs/kit/types/endpoint";
|
import type { EndpointOutput, RequestEvent } from "@sveltejs/kit";
|
||||||
import { RequestEvent } from "@sveltejs/kit/types/hooks";
|
|
||||||
import type { Auth } from "../auth";
|
import type { Auth } from "../auth";
|
||||||
import type { CallbackResult } from "../types";
|
import type { CallbackResult } from "../types";
|
||||||
import { Provider, ProviderConfig } from "./base";
|
import { Provider, ProviderConfig } from "./base";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { RequestEvent } from "@sveltejs/kit/types/hooks";
|
import { RequestEvent } from "@sveltejs/kit";
|
||||||
import type { Auth } from "../auth";
|
import type { Auth } from "../auth";
|
||||||
import { ucFirst } from "../helpers";
|
import { ucFirst } from "../helpers";
|
||||||
import { OAuth2BaseProvider, OAuth2BaseProviderConfig, OAuth2Tokens } from "./oauth2.base";
|
import { OAuth2BaseProvider, OAuth2BaseProviderConfig, OAuth2Tokens } from "./oauth2.base";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { RequestEvent } from "@sveltejs/kit/types/hooks";
|
import { RequestEvent } from "@sveltejs/kit";
|
||||||
import type { Auth } from "../auth";
|
import type { Auth } from "../auth";
|
||||||
import { OAuth2BaseProvider, OAuth2BaseProviderConfig } from "./oauth2.base";
|
import { OAuth2BaseProvider, OAuth2BaseProviderConfig } from "./oauth2.base";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user