Skip to content

Commit

Permalink
chore: remove new stuff from v4 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Dec 17, 2022
1 parent 6482e35 commit fd4af65
Show file tree
Hide file tree
Showing 152 changed files with 38 additions and 11,307 deletions.
8 changes: 1 addition & 7 deletions .github/sync.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# This is a legacy example pushed from the v4 branch
nextauthjs/next-auth-example:
- source: apps/example-nextjs
dest: .
deleteOrphaned: true
- .github/FUNDING.yml
- LICENSE

nextauthjs/next-auth-gatsby-example:
- source: apps/example-gatsby
dest: .
deleteOrphaned: true
- .github/FUNDING.yml
- LICENSE
2 changes: 1 addition & 1 deletion .github/workflows/sync-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Sync Example Repositories
on:
push:
branches:
- main
- v4
workflow_dispatch:
jobs:
sync:
Expand Down
1 change: 0 additions & 1 deletion apps/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"faunadb": "^4",
"next": "13.0.6",
"next-auth": "workspace:*",
"@auth/core": "workspace:*",
"nodemailer": "^6",
"react": "^18",
"react-dom": "^18"
Expand Down
94 changes: 36 additions & 58 deletions apps/dev/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
import { AuthHandler, type AuthOptions } from "@auth/core"
import NextAuth, { NextAuthOptions } from "next-auth"

// Providers
import Apple from "@auth/core/providers/apple"
import Auth0 from "@auth/core/providers/auth0"
import AzureAD from "@auth/core/providers/azure-ad"
import AzureB2C from "@auth/core/providers/azure-ad-b2c"
import BoxyHQSAML from "@auth/core/providers/boxyhq-saml"
// import Cognito from "@auth/core/providers/cognito"
import Credentials from "@auth/core/providers/credentials"
import Discord from "@auth/core/providers/discord"
import DuendeIDS6 from "@auth/core/providers/duende-identity-server6"
// import Email from "@auth/core/providers/email"
import Facebook from "@auth/core/providers/facebook"
import Foursquare from "@auth/core/providers/foursquare"
import Freshbooks from "@auth/core/providers/freshbooks"
import GitHub from "@auth/core/providers/github"
import Gitlab from "@auth/core/providers/gitlab"
import Google from "@auth/core/providers/google"
// import IDS4 from "@auth/core/providers/identity-server4"
import Instagram from "@auth/core/providers/instagram"
// import Keycloak from "@auth/core/providers/keycloak"
import Line from "@auth/core/providers/line"
import LinkedIn from "@auth/core/providers/linkedin"
import Mailchimp from "@auth/core/providers/mailchimp"
// import Okta from "@auth/core/providers/okta"
import Osu from "@auth/core/providers/osu"
import Patreon from "@auth/core/providers/patreon"
import Slack from "@auth/core/providers/slack"
import Spotify from "@auth/core/providers/spotify"
import Trakt from "@auth/core/providers/trakt"
import Twitch from "@auth/core/providers/twitch"
import Twitter from "@auth/core/providers/twitter"
import Vk from "@auth/core/providers/vk"
import Wikimedia from "@auth/core/providers/wikimedia"
import WorkOS from "@auth/core/providers/workos"
import Apple from "next-auth/providers/apple"
import Auth0 from "next-auth/providers/auth0"
import AzureAD from "next-auth/providers/azure-ad"
import AzureB2C from "next-auth/providers/azure-ad-b2c"
import BoxyHQSAML from "next-auth/providers/boxyhq-saml"
// import Cognito from "next-auth/providers/cognito"
import Credentials from "next-auth/providers/credentials"
import Discord from "next-auth/providers/discord"
import DuendeIDS6 from "next-auth/providers/duende-identity-server6"
// import Email from "next-auth/providers/email"
import Facebook from "next-auth/providers/facebook"
import Foursquare from "next-auth/providers/foursquare"
import Freshbooks from "next-auth/providers/freshbooks"
import GitHub from "next-auth/providers/github"
import Gitlab from "next-auth/providers/gitlab"
import Google from "next-auth/providers/google"
// import IDS4 from "next-auth/providers/identity-server4"
import Instagram from "next-auth/providers/instagram"
// import Keycloak from "next-auth/providers/keycloak"
import Line from "next-auth/providers/line"
import LinkedIn from "next-auth/providers/linkedin"
import Mailchimp from "next-auth/providers/mailchimp"
// import Okta from "next-auth/providers/okta"
import Osu from "next-auth/providers/osu"
import Patreon from "next-auth/providers/patreon"
import Slack from "next-auth/providers/slack"
import Spotify from "next-auth/providers/spotify"
import Trakt from "next-auth/providers/trakt"
import Twitch from "next-auth/providers/twitch"
import Twitter from "next-auth/providers/twitter"
import Vk from "next-auth/providers/vk"
import Wikimedia from "next-auth/providers/wikimedia"
import WorkOS from "next-auth/providers/workos"

// // Prisma
// import { PrismaClient } from "@prisma/client"
Expand Down Expand Up @@ -66,7 +66,7 @@ import WorkOS from "@auth/core/providers/workos"
// secret: process.env.SUPABASE_SERVICE_ROLE_KEY,
// })

export const authOptions: AuthOptions = {
export const authOptions: NextAuthOptions = {
// adapter,
// debug: process.env.NODE_ENV !== "production",
theme: {
Expand Down Expand Up @@ -129,26 +129,4 @@ if (authOptions.adapter) {
// )
}

// TODO: move to next-auth/edge
function Auth(...args: any[]) {
const envSecret = process.env.AUTH_SECRET ?? process.env.NEXTAUTH_SECRET
const envTrustHost = !!(process.env.NEXTAUTH_URL ?? process.env.AUTH_TRUST_HOST ?? process.env.VERCEL ?? process.env.NODE_ENV !== "production")
if (args.length === 1) {
return async (req: Request) => {
args[0].secret ??= envSecret
args[0].trustHost ??= envTrustHost
return await AuthHandler(req, args[0])
}
}
args[1].secret ??= envSecret
args[1].trustHost ??= envTrustHost
return AuthHandler(args[0], args[1])
}

// export default Auth(authOptions)

export default function handle(request: Request) {
return Auth(request, authOptions)
}

export const config = { runtime: "experimental-edge" }
export default NextAuth(authOptions)
4 changes: 0 additions & 4 deletions apps/playground-sveltekit/.env.example

This file was deleted.

13 changes: 0 additions & 13 deletions apps/playground-sveltekit/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions apps/playground-sveltekit/.eslintrc.cjs

This file was deleted.

12 changes: 0 additions & 12 deletions apps/playground-sveltekit/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions apps/playground-sveltekit/.prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions apps/playground-sveltekit/.prettierrc

This file was deleted.

76 changes: 0 additions & 76 deletions apps/playground-sveltekit/README.md

This file was deleted.

37 changes: 0 additions & 37 deletions apps/playground-sveltekit/package.json

This file was deleted.

32 changes: 0 additions & 32 deletions apps/playground-sveltekit/src/app.d.ts

This file was deleted.

15 changes: 0 additions & 15 deletions apps/playground-sveltekit/src/app.html

This file was deleted.

Loading

1 comment on commit fd4af65

@vercel
Copy link

@vercel vercel bot commented on fd4af65 Dec 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.