From 991dbd4da7d0685b4f0636796247d939712f1f58 Mon Sep 17 00:00:00 2001 From: Murderlon Date: Tue, 14 Jan 2025 16:55:18 +0100 Subject: [PATCH] Remove GitHub login Opinionated login you can easily add yourself if you want it --- infra/auth.ts | 8 +------ infra/secret.ts | 2 -- infra/www.ts | 2 -- packages/core/sst-env.d.ts | 8 ------- packages/functions/sst-env.d.ts | 8 ------- packages/www/app/routes/admin+/_layout.tsx | 20 +--------------- packages/www/app/routes/dashboard+/_index.tsx | 19 +-------------- packages/www/sst-env.d.ts | 8 ------- readme.md | 23 ------------------- sst-env.d.ts | 8 ------- 10 files changed, 3 insertions(+), 103 deletions(-) diff --git a/infra/auth.ts b/infra/auth.ts index 9424293..cedb7ff 100644 --- a/infra/auth.ts +++ b/infra/auth.ts @@ -18,13 +18,7 @@ export const auth = new sst.aws.Auth('Auth', { forceUpgrade: 'v2', authorizer: { handler: 'packages/functions/auth.handler', - link: [ - email, - authTable, - secret.GITHUB_CLIENT_ID, - secret.GITHUB_CLIENT_SECRET, - secret.DATABASE_URL, - ], + link: [email, authTable, secret.DATABASE_URL], permissions: [ { actions: ['ses:SendEmail'], diff --git a/infra/secret.ts b/infra/secret.ts index 635d28b..53fd1d3 100644 --- a/infra/secret.ts +++ b/infra/secret.ts @@ -4,7 +4,5 @@ export const secret = { DATABASE_URL: new sst.Secret('DATABASE_URL'), STRIPE_PUBLIC_KEY: new sst.Secret('STRIPE_PUBLIC_KEY'), STRIPE_SECRET_KEY: new sst.Secret('STRIPE_SECRET_KEY'), - GITHUB_CLIENT_ID: new sst.Secret('GITHUB_CLIENT_ID'), - GITHUB_CLIENT_SECRET: new sst.Secret('GITHUB_CLIENT_SECRET'), HONEYPOT_ENCRYPTION_SEED: new sst.Secret('HONEYPOT_ENCRYPTION_SEED'), } diff --git a/infra/www.ts b/infra/www.ts index 86c5d2c..ea23ffe 100644 --- a/infra/www.ts +++ b/infra/www.ts @@ -27,8 +27,6 @@ export const www = new sst.aws.React('ReactRouter', { secret.DATABASE_URL, secret.STRIPE_PUBLIC_KEY, secret.STRIPE_SECRET_KEY, - secret.GITHUB_CLIENT_ID, - secret.GITHUB_CLIENT_SECRET, secret.HONEYPOT_ENCRYPTION_SEED, ], }) diff --git a/packages/core/sst-env.d.ts b/packages/core/sst-env.d.ts index 096a535..469a95b 100644 --- a/packages/core/sst-env.d.ts +++ b/packages/core/sst-env.d.ts @@ -32,14 +32,6 @@ declare module "sst" { "sender": string "type": "sst.aws.Email" } - "GITHUB_CLIENT_ID": { - "type": "sst.sst.Secret" - "value": string - } - "GITHUB_CLIENT_SECRET": { - "type": "sst.sst.Secret" - "value": string - } "HONEYPOT_ENCRYPTION_SEED": { "type": "sst.sst.Secret" "value": string diff --git a/packages/functions/sst-env.d.ts b/packages/functions/sst-env.d.ts index 096a535..469a95b 100644 --- a/packages/functions/sst-env.d.ts +++ b/packages/functions/sst-env.d.ts @@ -32,14 +32,6 @@ declare module "sst" { "sender": string "type": "sst.aws.Email" } - "GITHUB_CLIENT_ID": { - "type": "sst.sst.Secret" - "value": string - } - "GITHUB_CLIENT_SECRET": { - "type": "sst.sst.Secret" - "value": string - } "HONEYPOT_ENCRYPTION_SEED": { "type": "sst.sst.Secret" "value": string diff --git a/packages/www/app/routes/admin+/_layout.tsx b/packages/www/app/routes/admin+/_layout.tsx index caa1e0d..698f954 100644 --- a/packages/www/app/routes/admin+/_layout.tsx +++ b/packages/www/app/routes/admin+/_layout.tsx @@ -1,10 +1,8 @@ import type { MetaFunction, LoaderFunctionArgs } from 'react-router' import { useLoaderData } from 'react-router' -import { LucideShoppingBasket, LucideExternalLink } from 'lucide-react' +import { LucideShoppingBasket } from 'lucide-react' import { requireUserWithRole } from '#app/utils/permissions.server' -import { cn } from '#app/utils/misc.js' import { siteConfig } from '#app/utils/constants/brand' -import { buttonVariants } from '#app/components/ui/button' import { Navigation } from '#app/components/navigation' import { Subscription } from '@company/core/src/subscription/index' import { User } from '@company/core/src/user/index' @@ -57,22 +55,6 @@ export default function Admin() {

-
- - - Explore Documentation - - - -
-
diff --git a/packages/www/app/routes/dashboard+/_index.tsx b/packages/www/app/routes/dashboard+/_index.tsx index 035e5e4..72cb7bc 100644 --- a/packages/www/app/routes/dashboard+/_index.tsx +++ b/packages/www/app/routes/dashboard+/_index.tsx @@ -1,10 +1,8 @@ import type { MetaFunction, LoaderFunctionArgs } from 'react-router' -import { LucidePlus, LucideExternalLink } from 'lucide-react' +import { LucidePlus } from 'lucide-react' import { useTranslation } from 'react-i18next' import { requireUser } from '#app/modules/auth/auth.server' -import { cn } from '#app/utils/misc.js' import { siteConfig } from '#app/utils/constants/brand' -import { buttonVariants } from '#app/components/ui/button' import { Subscription } from '@company/core/src/subscription/index' export const meta: MetaFunction = () => { @@ -51,21 +49,6 @@ export default function DashboardIndex() {
-
- - - Explore Documentation - - - -
diff --git a/packages/www/sst-env.d.ts b/packages/www/sst-env.d.ts index 096a535..469a95b 100644 --- a/packages/www/sst-env.d.ts +++ b/packages/www/sst-env.d.ts @@ -32,14 +32,6 @@ declare module "sst" { "sender": string "type": "sst.aws.Email" } - "GITHUB_CLIENT_ID": { - "type": "sst.sst.Secret" - "value": string - } - "GITHUB_CLIENT_SECRET": { - "type": "sst.sst.Secret" - "value": string - } "HONEYPOT_ENCRYPTION_SEED": { "type": "sst.sst.Secret" "value": string diff --git a/readme.md b/readme.md index 35209d1..4d66331 100644 --- a/readme.md +++ b/readme.md @@ -61,7 +61,6 @@ Check it live 👉 - Postgres Row-Level Security (see [Drizzle](https://orm.drizzle.team/docs/rls) and [Neon](https://neon.tech/docs/guides/neon-authorize) docs). - File uploads to S3 and served over Cloudfront. -- The new SST [OpenAUTH](https://openauth.js.org) component instead of rolling it ourselves. - Tailwind [v4.0](https://tailwindcss.com/blog/tailwindcss-v4-beta) when it comes out. @@ -326,28 +325,6 @@ Go to production ```sh bunx sst deploy --production ``` - -### Authentication - -The following methods are supported: - -- Email/Code -- Magic Links -- Social Logins (Github) - -Under the hood, we are using `remix-auth`, `remix-auth-totp` and -`remix-auth-github` to handle the authentication process. - -In order to speed up development, the OTP code will also be displayed in the -terminal/console, so you don't have to constantly check the email inbox. -(Recommended for development purposes only.) - -You can authenticate as `admin` by using the following credentials: - -- Email: `admin@admin.com` -- Code: OTP Code is provided by the terminal/console, as email is not sent to - the `admin` user. - ### Subscriptions The following subscription features are included: diff --git a/sst-env.d.ts b/sst-env.d.ts index 096a535..469a95b 100644 --- a/sst-env.d.ts +++ b/sst-env.d.ts @@ -32,14 +32,6 @@ declare module "sst" { "sender": string "type": "sst.aws.Email" } - "GITHUB_CLIENT_ID": { - "type": "sst.sst.Secret" - "value": string - } - "GITHUB_CLIENT_SECRET": { - "type": "sst.sst.Secret" - "value": string - } "HONEYPOT_ENCRYPTION_SEED": { "type": "sst.sst.Secret" "value": string