remove supabase 4bc9bfbc
Steve · 2024-09-20 20:47 7 file(s) · +0 −198
package.json +0 −2
48 48
		"@astrojs/react": "^3.6.2",
49 49
		"@astrojs/rss": "^4.0.7",
50 50
		"@astrojs/ts-plugin": "^1.10.2",
51 -
		"@supabase/ssr": "^0.5.1",
52 -
		"@supabase/supabase-js": "^2.45.4",
53 51
		"@types/react": "^18.3.8",
54 52
		"@types/react-dom": "^18.3.0",
55 53
		"@vercel/analytics": "^0.1.10",
pnpm-lock.yaml +0 −110
23 23
      '@astrojs/ts-plugin':
24 24
        specifier: ^1.10.2
25 25
        version: 1.10.2
26 -
      '@supabase/ssr':
27 -
        specifier: ^0.5.1
28 -
        version: 0.5.1(@supabase/supabase-js@2.45.4)
29 -
      '@supabase/supabase-js':
30 -
        specifier: ^2.45.4
31 -
        version: 2.45.4
32 26
      '@types/react':
33 27
        specifier: ^18.3.8
34 28
        version: 18.3.8
968 962
  '@shikijs/vscode-textmate@9.2.2':
969 963
    resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==}
970 964
971 -
  '@supabase/auth-js@2.65.0':
972 -
    resolution: {integrity: sha512-+wboHfZufAE2Y612OsKeVP4rVOeGZzzMLD/Ac3HrTQkkY4qXNjI6Af9gtmxwccE5nFvTiF114FEbIQ1hRq5uUw==}
973 -
974 -
  '@supabase/functions-js@2.4.1':
975 -
    resolution: {integrity: sha512-8sZ2ibwHlf+WkHDUZJUXqqmPvWQ3UHN0W30behOJngVh/qHHekhJLCFbh0AjkE9/FqqXtf9eoVvmYgfCLk5tNA==}
976 -
977 -
  '@supabase/node-fetch@2.6.15':
978 -
    resolution: {integrity: sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ==}
979 -
    engines: {node: 4.x || >=6.0.0}
980 -
981 -
  '@supabase/postgrest-js@1.16.1':
982 -
    resolution: {integrity: sha512-EOSEZFm5pPuCPGCmLF1VOCS78DfkSz600PBuvBND/IZmMciJ1pmsS3ss6TkB6UkuvTybYiBh7gKOYyxoEO3USA==}
983 -
984 -
  '@supabase/realtime-js@2.10.2':
985 -
    resolution: {integrity: sha512-qyCQaNg90HmJstsvr2aJNxK2zgoKh9ZZA8oqb7UT2LCh3mj9zpa3Iwu167AuyNxsxrUE8eEJ2yH6wLCij4EApA==}
986 -
987 -
  '@supabase/ssr@0.5.1':
988 -
    resolution: {integrity: sha512-+G94H/GZG0nErZ3FQV9yJmsC5Rj7dmcfCAwOt37hxeR1La+QTl8cE9whzYwPUrTJjMLGNXoO+1BMvVxwBAbz4g==}
989 -
    peerDependencies:
990 -
      '@supabase/supabase-js': ^2.43.4
991 -
992 -
  '@supabase/storage-js@2.7.0':
993 -
    resolution: {integrity: sha512-iZenEdO6Mx9iTR6T7wC7sk6KKsoDPLq8rdu5VRy7+JiT1i8fnqfcOr6mfF2Eaqky9VQzhP8zZKQYjzozB65Rig==}
994 -
995 -
  '@supabase/supabase-js@2.45.4':
996 -
    resolution: {integrity: sha512-E5p8/zOLaQ3a462MZnmnz03CrduA5ySH9hZyL03Y+QZLIOO4/Gs8Rdy4ZCKDHsN7x0xdanVEWWFN3pJFQr9/hg==}
997 -
998 965
  '@tailwindcss/aspect-ratio@0.4.2':
999 966
    resolution: {integrity: sha512-8QPrypskfBa7QIMuKHg2TA7BqES6vhBrDLOv8Unb6FcFyd3TjKbc6lcmb9UPQHxfl24sXoJ41ux/H7qQQvfaSQ==}
1000 967
    peerDependencies:
1079 1046
  '@types/parse-json@4.0.2':
1080 1047
    resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
1081 1048
1082 -
  '@types/phoenix@1.6.5':
1083 -
    resolution: {integrity: sha512-xegpDuR+z0UqG9fwHqNoy3rI7JDlvaPh2TY47Fl80oq6g+hXT+c/LEuE43X48clZ6lOfANl5WrPur9fYO1RJ/w==}
1084 -
1085 1049
  '@types/prettier@2.7.3':
1086 1050
    resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==}
1087 1051
1108 1072
1109 1073
  '@types/unist@3.0.3':
1110 1074
    resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
1111 -
1112 -
  '@types/ws@8.5.12':
1113 -
    resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==}
1114 1075
1115 1076
  '@typescript-eslint/eslint-plugin@5.62.0':
1116 1077
    resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==}
3638 3599
    resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
3639 3600
    engines: {node: '>=8.0'}
3640 3601
3641 -
  tr46@0.0.3:
3642 -
    resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
3643 -
3644 3602
  trim-lines@3.0.1:
3645 3603
    resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
3646 3604
3850 3808
3851 3809
  web-namespaces@2.0.1:
3852 3810
    resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==}
3853 -
3854 -
  webidl-conversions@3.0.1:
3855 -
    resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
3856 -
3857 -
  whatwg-url@5.0.0:
3858 -
    resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
3859 3811
3860 3812
  which-boxed-primitive@1.0.2:
3861 3813
    resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==}
4754 4706
4755 4707
  '@shikijs/vscode-textmate@9.2.2': {}
4756 4708
4757 -
  '@supabase/auth-js@2.65.0':
4758 -
    dependencies:
4759 -
      '@supabase/node-fetch': 2.6.15
4760 -
4761 -
  '@supabase/functions-js@2.4.1':
4762 -
    dependencies:
4763 -
      '@supabase/node-fetch': 2.6.15
4764 -
4765 -
  '@supabase/node-fetch@2.6.15':
4766 -
    dependencies:
4767 -
      whatwg-url: 5.0.0
4768 -
4769 -
  '@supabase/postgrest-js@1.16.1':
4770 -
    dependencies:
4771 -
      '@supabase/node-fetch': 2.6.15
4772 -
4773 -
  '@supabase/realtime-js@2.10.2':
4774 -
    dependencies:
4775 -
      '@supabase/node-fetch': 2.6.15
4776 -
      '@types/phoenix': 1.6.5
4777 -
      '@types/ws': 8.5.12
4778 -
      ws: 8.18.0
4779 -
    transitivePeerDependencies:
4780 -
      - bufferutil
4781 -
      - utf-8-validate
4782 -
4783 -
  '@supabase/ssr@0.5.1(@supabase/supabase-js@2.45.4)':
4784 -
    dependencies:
4785 -
      '@supabase/supabase-js': 2.45.4
4786 -
      cookie: 0.6.0
4787 -
4788 -
  '@supabase/storage-js@2.7.0':
4789 -
    dependencies:
4790 -
      '@supabase/node-fetch': 2.6.15
4791 -
4792 -
  '@supabase/supabase-js@2.45.4':
4793 -
    dependencies:
4794 -
      '@supabase/auth-js': 2.65.0
4795 -
      '@supabase/functions-js': 2.4.1
4796 -
      '@supabase/node-fetch': 2.6.15
4797 -
      '@supabase/postgrest-js': 1.16.1
4798 -
      '@supabase/realtime-js': 2.10.2
4799 -
      '@supabase/storage-js': 2.7.0
4800 -
    transitivePeerDependencies:
4801 -
      - bufferutil
4802 -
      - utf-8-validate
4803 -
4804 4709
  '@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.12)':
4805 4710
    dependencies:
4806 4711
      tailwindcss: 3.4.12
4895 4800
4896 4801
  '@types/parse-json@4.0.2': {}
4897 4802
4898 -
  '@types/phoenix@1.6.5': {}
4899 -
4900 4803
  '@types/prettier@2.7.3': {}
4901 4804
4902 4805
  '@types/prop-types@15.7.13': {}
4923 4826
  '@types/unist@2.0.11': {}
4924 4827
4925 4828
  '@types/unist@3.0.3': {}
4926 -
4927 -
  '@types/ws@8.5.12':
4928 -
    dependencies:
4929 -
      '@types/node': 22.5.5
4930 4829
4931 4830
  '@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)':
4932 4831
    dependencies:
8211 8110
    dependencies:
8212 8111
      is-number: 7.0.0
8213 8112
8214 -
  tr46@0.0.3: {}
8215 -
8216 8113
  trim-lines@3.0.1: {}
8217 8114
8218 8115
  trim-newlines@3.0.1: {}
8421 8318
  vscode-uri@3.0.8: {}
8422 8319
8423 8320
  web-namespaces@2.0.1: {}
8424 -
8425 -
  webidl-conversions@3.0.1: {}
8426 -
8427 -
  whatwg-url@5.0.0:
8428 -
    dependencies:
8429 -
      tr46: 0.0.3
8430 -
      webidl-conversions: 3.0.1
8431 8321
8432 8322
  which-boxed-primitive@1.0.2:
8433 8323
    dependencies:
src/components/SignInButton.tsx (deleted) +0 −18
1 -
import { supabase } from "src/lib/supabase";
2 -
3 -
export function SignInButton() {
4 -
	async function signInWithGithub() {
5 -
		await supabase.auth.signInWithOAuth({
6 -
			provider: "github",
7 -
			options: {
8 -
				redirectTo: "https://stevedylan.dev/auth/callback",
9 -
			},
10 -
		});
11 -
	}
12 -
13 -
	return (
14 -
		<button type="button" onClick={signInWithGithub}>
15 -
			Sign In
16 -
		</button>
17 -
	);
18 -
}
src/lib/supabase.ts (deleted) +0 −11
1 -
import { createClient } from "@supabase/supabase-js";
2 -
3 -
export const supabase = createClient(
4 -
	import.meta.env.PUBLIC_SUPABASE_URL,
5 -
	import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
6 -
	{
7 -
		auth: {
8 -
			flowType: "pkce",
9 -
		},
10 -
	},
11 -
);
src/pages/auth/auth-code-error.astro (deleted) +0 −14
1 -
---
2 -
import PageLayout from "@/layouts/Base";
3 -
4 -
const meta = {
5 -
	title: "Auth Error",
6 -
	description: "Something went wrong",
7 -
};
8 -
---
9 -
10 -
<PageLayout meta={meta}>
11 -
	<div class="space-y-6">
12 -
	 <p>Error with auth</p>
13 -
	</div>
14 -
</PageLayout>
src/pages/auth/callback.ts (deleted) +0 −28
1 -
export const prerender = false;
2 -
import type { APIRoute } from "astro";
3 -
import { supabase } from "../../lib/supabase";
4 -
5 -
export const GET: APIRoute = async ({ url, cookies, redirect }) => {
6 -
	const authCode = url.searchParams.get("code");
7 -
8 -
	if (!authCode) {
9 -
		return new Response("No code provided", { status: 400 });
10 -
	}
11 -
12 -
	const { data, error } = await supabase.auth.exchangeCodeForSession(authCode);
13 -
14 -
	//if (error) {
15 -
		//return new Response(error.message, { status: 500 });
16 -
	//}
17 -
18 -
	const { access_token, refresh_token } = data.session;
19 -
20 -
	cookies.set("sb-access-token", access_token, {
21 -
		path: "/",
22 -
	});
23 -
	cookies.set("sb-refresh-token", refresh_token, {
24 -
		path: "/",
25 -
	});
26 -
27 -
	return redirect("/log");
28 -
};
src/pages/log.astro (deleted) +0 −15
1 -
---
2 -
import PageLayout from "@/layouts/Base";
3 -
import { SignInButton } from "src/components/SignInButton";
4 -
5 -
const meta = {
6 -
	title: "Log",
7 -
	description: "Public Log",
8 -
};
9 -
---
10 -
11 -
<PageLayout meta={meta}>
12 -
	<div class="space-y-6">
13 -
	<SignInButton client:load />
14 -
	</div>
15 -
</PageLayout>