Skip to content

Commit e3bb988

Browse files
chore(dev): fix dev app imports (#1991)
1 parent 827049c commit e3bb988

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

app/pages/api/auth/[...nextauth].js

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
import NextAuth from 'next-auth'
2-
import Providers from 'next-auth/providers'
1+
import NextAuth from "next-auth"
2+
import EmailProvider from "next-auth/providers/email"
3+
import GitHubProvider from "next-auth/providers/github"
4+
import Auth0Provider from "next-auth/providers/auth0"
5+
import TwitterProvider from "next-auth/providers/twitter"
6+
import CredentialsProvider from "next-auth/providers/credentials"
37

48
// import Adapters from 'next-auth/adapters'
59
// import { PrismaClient } from '@prisma/client'
@@ -28,15 +32,15 @@ export default NextAuth({
2832
// }
2933
// },
3034
providers: [
31-
Providers.Email({
35+
EmailProvider({
3236
server: process.env.EMAIL_SERVER,
33-
from: process.env.EMAIL_FROM
37+
from: process.env.EMAIL_FROM,
3438
}),
35-
Providers.GitHub({
39+
GitHubProvider({
3640
clientId: process.env.GITHUB_ID,
37-
clientSecret: process.env.GITHUB_SECRET
41+
clientSecret: process.env.GITHUB_SECRET,
3842
}),
39-
Providers.Auth0({
43+
Auth0Provider({
4044
clientId: process.env.AUTH0_ID,
4145
clientSecret: process.env.AUTH0_SECRET,
4246
domain: process.env.AUTH0_DOMAIN,
@@ -45,36 +49,36 @@ export default NextAuth({
4549
// authorizationParams: {
4650
// response_mode: 'form_post'
4751
// }
48-
protection: 'pkce'
52+
protection: "pkce",
4953
}),
50-
Providers.Twitter({
54+
TwitterProvider({
5155
clientId: process.env.TWITTER_ID,
52-
clientSecret: process.env.TWITTER_SECRET
56+
clientSecret: process.env.TWITTER_SECRET,
5357
}),
54-
Providers.Credentials({
55-
name: 'Credentials',
58+
CredentialsProvider({
59+
name: "Credentials",
5660
credentials: {
57-
password: { label: 'Password', type: 'password' }
61+
password: { label: "Password", type: "password" },
5862
},
59-
async authorize (credentials) {
60-
if (credentials.password === 'password') {
63+
async authorize(credentials) {
64+
if (credentials.password === "password") {
6165
return {
6266
id: 1,
63-
name: 'Fill Murray',
64-
65-
image: 'https://www.fillmurray.com/64/64'
67+
name: "Fill Murray",
68+
69+
image: "https://www.fillmurray.com/64/64",
6670
}
6771
}
6872
return null
69-
}
70-
})
73+
},
74+
}),
7175
],
7276
jwt: {
7377
encryption: true,
74-
secret: process.env.SECRET
78+
secret: process.env.SECRET,
7579
},
7680
debug: false,
77-
theme: 'auto'
81+
theme: "auto",
7882

7983
// Default Database Adapter (TypeORM)
8084
// database: process.env.DATABASE_URL

0 commit comments

Comments
 (0)