Skip to content

Commit

Permalink
Remove GitHub login
Browse files Browse the repository at this point in the history
Opinionated login you can easily add yourself if you want it
  • Loading branch information
Murderlon committed Jan 14, 2025
1 parent b22b440 commit 991dbd4
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 103 deletions.
8 changes: 1 addition & 7 deletions infra/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
2 changes: 0 additions & 2 deletions infra/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
}
2 changes: 0 additions & 2 deletions infra/www.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
})
8 changes: 0 additions & 8 deletions packages/core/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions packages/functions/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 1 addition & 19 deletions packages/www/app/routes/admin+/_layout.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -57,22 +55,6 @@ export default function Admin() {
</p>
</div>
</div>
<div className="z-10 flex items-center justify-center">
<a
target="_blank"
rel="noreferrer"
href="https://github.com/dev-xo/remix-saas/tree/main/docs#welcome-to-%EF%B8%8F-remix-saas-documentation"
className={cn(
`${buttonVariants({ variant: 'ghost', size: 'sm' })} gap-2`,
)}
>
<span className="text-sm font-medium text-primary/60 group-hover:text-primary">
Explore Documentation
</span>
<LucideExternalLink className="h-4 w-4 stroke-[1.5px] text-primary/60 group-hover:text-primary" />
</a>
</div>

<div className="base-grid absolute h-full w-full opacity-40" />
<div className="absolute bottom-0 h-full w-full bg-gradient-to-t from-[hsl(var(--card))] to-transparent" />
</div>
Expand Down
19 changes: 1 addition & 18 deletions packages/www/app/routes/dashboard+/_index.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand Down Expand Up @@ -51,21 +49,6 @@ export default function DashboardIndex() {
</span>
</div>
</div>
<div className="z-10 flex items-center justify-center">
<a
target="_blank"
rel="noreferrer"
href="https://github.com/dev-xo/remix-saas/tree/main/docs#welcome-to-%EF%B8%8F-remix-saas-documentation"
className={cn(
`${buttonVariants({ variant: 'ghost', size: 'sm' })} gap-2`,
)}
>
<span className="text-sm font-medium text-primary/60 group-hover:text-primary">
Explore Documentation
</span>
<LucideExternalLink className="h-4 w-4 stroke-[1.5px] text-primary/60 group-hover:text-primary" />
</a>
</div>
<div className="base-grid absolute h-full w-full opacity-40" />
<div className="absolute bottom-0 h-full w-full bg-gradient-to-t from-[hsl(var(--card))] to-transparent" />
</div>
Expand Down
8 changes: 0 additions & 8 deletions packages/www/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Check it live 👉 <https://stack.merlijn.site>
- 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.

Expand Down Expand Up @@ -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: `[email protected]`
- 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:
Expand Down
8 changes: 0 additions & 8 deletions sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 991dbd4

Please sign in to comment.