Skip to content

Commit 7847ec8

Browse files
committed
remove deprecated authentik login and admin dash
1 parent ddc866a commit 7847ec8

8 files changed

Lines changed: 754 additions & 841 deletions

File tree

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Live at [projectsegfau.lt](https://projectsegfau.lt).
44

55
## Developing
66

7-
> You need a lot of infrastructure to run a complete version of the website including: Ghost CMS deployment and Authentik authentication.
7+
> You need a lot of infrastructure to run a complete version of the website including a Ghost CMS deployment.
88
99
### Prerequisites
1010

@@ -39,11 +39,6 @@ The website has the following **mandatory** environment variables
3939

4040
| Name | Description |
4141
| :----------------- | :--------------------------------------------- |
42-
| AUTH_CLIENT_ID | Authentik client ID |
43-
| AUTH_CLIENT_SECRET | Authentik client secret |
44-
| AUTH_ISSUER | Authentication issuer URL |
45-
| AUTH_TRUST_HOST | Your domain |
46-
| AUTH_SECRET | Random 32 char secret |
4742
| GHOST_URL | Your Ghost CMS URL |
4843
| GHOST_API_KEY | Your Ghost CMS API key |
4944
| KUMA_URL | Your Uptime Kuma announcements URL |

package.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,27 @@
1212
"format": "prettier --plugin-search-dir . --write ."
1313
},
1414
"devDependencies": {
15-
"@iconify-json/ic": "^1.2.1",
16-
"@iconify-json/simple-icons": "^1.2.11",
15+
"@iconify-json/ic": "^1.2.2",
16+
"@iconify-json/simple-icons": "^1.2.42",
1717
"@sveltejs/adapter-node": "^4.0.1",
18-
"@sveltejs/kit": "^2.7.7",
19-
"@types/sanitize-html": "^2.13.0",
18+
"@sveltejs/kit": "^2.22.5",
19+
"@types/sanitize-html": "^2.16.0",
2020
"@unocss/reset": "^0.58.9",
21-
"axios": "^1.7.7",
21+
"axios": "^1.10.0",
2222
"dayjs": "^1.11.13",
23-
"prettier": "^3.3.3",
24-
"prettier-plugin-svelte": "^3.2.7",
25-
"sanitize-html": "^2.13.1",
26-
"svelte": "^4.2.19",
23+
"prettier": "^3.6.2",
24+
"prettier-plugin-svelte": "^3.4.0",
25+
"sanitize-html": "^2.17.0",
26+
"svelte": "^4.2.20",
2727
"svelte-check": "^3.8.6",
2828
"svelte-dark-mode": "^2.1.0",
2929
"tslib": "^2.8.1",
30-
"typescript": "^5.6.3",
30+
"typescript": "^5.8.3",
3131
"unocss": "^0.58.9",
32-
"vite": "^5.4.10"
32+
"vite": "^5.4.19"
3333
},
3434
"type": "module",
3535
"dependencies": {
36-
"@auth/core": "^0.22.0",
37-
"@auth/sveltekit": "^0.8.0",
3836
"@sveltejs/vite-plugin-svelte": "^3.1.2",
3937
"@unocss/extractor-svelte": "^0.58.9",
4038
"joi": "^17.13.3",

pnpm-lock.yaml

Lines changed: 742 additions & 685 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hooks.server.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import { SvelteKitAuth } from "@auth/sveltekit";
2-
import Authentik from "@auth/core/providers/authentik";
31
import { env } from "$env/dynamic/private";
4-
import type { Provider } from "@auth/core/providers";
5-
import type { Profile } from "@auth/core/types";
6-
import { redirect, type Handle } from "@sveltejs/kit";
7-
import { sequence } from "@sveltejs/kit/hooks";
82
import {
93
announcements,
104
pubnixUsers,
@@ -19,52 +13,6 @@ const agent = new Agent({
1913
family: 4
2014
});
2115

22-
const hasAuth =
23-
!env.AUTH_CLIENT_ID ||
24-
!env.AUTH_CLIENT_SECRET ||
25-
!env.AUTH_ISSUER ||
26-
!env.AUTH_TRUST_HOST ||
27-
!env.AUTH_SECRET
28-
? false
29-
: true;
30-
31-
export const handle: Handle = sequence(
32-
//@ts-ignore
33-
SvelteKitAuth({
34-
providers: [
35-
Authentik({
36-
clientId: env.AUTH_CLIENT_ID,
37-
clientSecret: env.AUTH_CLIENT_SECRET,
38-
issuer: env.AUTH_ISSUER
39-
}) as Provider<Profile>
40-
]
41-
}),
42-
hasAuth
43-
? async ({ event, resolve }) => {
44-
if (event.url.pathname.startsWith("/admin")) {
45-
const session = await event.locals.getSession();
46-
if (!session) {
47-
throw redirect(303, "/login");
48-
}
49-
}
50-
51-
const result = await resolve(event, {
52-
transformPageChunk: ({ html }) => html
53-
});
54-
return result;
55-
}
56-
: async ({ event, resolve }) => {
57-
if (event.url.pathname.startsWith("/admin")) {
58-
throw redirect(303, "/login");
59-
}
60-
61-
const result = await resolve(event, {
62-
transformPageChunk: ({ html }) => html
63-
});
64-
return result;
65-
}
66-
);
67-
6816
export const fetchGhost = async (action: string, additional?: string) => {
6917
return await axios(
7018
env.GHOST_URL +

src/routes/admin/+page.svelte

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/routes/admin/+page.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/routes/login/+page.server.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/routes/login/+page.svelte

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)