Skip to content

Commit

Permalink
Update and rename route.ts to .js
Browse files Browse the repository at this point in the history
change of ...nextauth providers and  import replacement  from nextauth.js
  • Loading branch information
patooworld authored Jun 13, 2024
1 parent 32b9082 commit 5b5aa3f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
33 changes: 33 additions & 0 deletions app/api/auth/[...nextauth]/.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import NextAuth from "next-auth"
import NextAuth from 'next-auth'
import AppleProvider from 'next-auth/providers/apple'
import FacebookProvider from 'next-auth/providers/facebook'
import GoogleProvider from 'next-auth/providers/google'
import EmailProvider from 'next-auth/providers/email'
import GithubProvider from 'next-auth/providers/github'

providers: [
// OAuth authentication providers...
AppleProvider({
clientId: process.env.APPLE_ID,
clientSecret: process.env.APPLE_SECRET
}),
FacebookProvider({
clientId: process.env.FACEBOOK_ID,
clientSecret: process.env.FACEBOOK_SECRET
}),
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET
}),
// Passwordless / email sign in
EmailProvider({
server: process.env.MAIL_SERVER,
from: 'NextAuth.js <[email protected]>'
}),
GithubProvider({
ClientId: process.env.GITHUB_Client_ID,
ClientSecret: process.env.GITHUB_CLIENT_SECRET
}),
]
})
6 changes: 0 additions & 6 deletions app/api/auth/[...nextauth]/route.ts

This file was deleted.

0 comments on commit 5b5aa3f

Please sign in to comment.