add more providers

This commit is contained in:
Balázs Orbán
2023-05-01 13:42:35 +02:00
parent e2ef07688c
commit 5551c4f147
3 changed files with 23 additions and 17 deletions

View File

@@ -1,9 +1,13 @@
import NextAuth from "next-auth"
import GitHub from "@auth/core/providers/github"
import Auth0 from "@auth/core/providers/auth0"
import Facebook from "@auth/core/providers/facebook"
import GitHub from "@auth/core/providers/github"
import Google from "@auth/core/providers/google"
import Twitter from "@auth/core/providers/twitter"
export const { handlers, auth } = NextAuth({
providers: [GitHub, Auth0],
debug: true,
providers: [GitHub, Auth0, Facebook, Google, Twitter],
callbacks: {
async authorized({ request, auth }) {
// if (request.method === "POST") {

View File

@@ -1,19 +1,17 @@
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET= # Linux: `openssl rand -hex 32` or go to https://generate-secret.vercel.app/32
AUTH_SECRET= # Linux: `openssl rand -hex 32` or go to https://generate-secret.vercel.app/32
AUTH_AUTH0_ID=
AUTH_AUTH0_SECRET=
AUTH_AUTH0_ISSUER=
AUTH0_ID=
AUTH0_SECRET=
AUTH0_ISSUER=
AUTH_FACEBOOK_ID=
AUTH_FACEBOOK_SECRET=
FACEBOOK_ID=
FACEBOOK_SECRET=
AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
GITHUB_ID=
GITHUB_SECRET=
AUTH_GOOGLE_ID=
AUTH_GOOGLE_SECRET=
GOOGLE_ID=
GOOGLE_SECRET=
TWITTER_ID=
TWITTER_SECRET=
AUTH_TWITTER_ID=
AUTH_TWITTER_SECRET=

View File

@@ -1,8 +1,12 @@
import NextAuth from "next-auth"
import Auth0 from "@auth/core/providers/github"
import Facebook from "@auth/core/providers/facebook"
import GitHub from "@auth/core/providers/github"
import Google from "@auth/core/providers/google"
import Twitter from "@auth/core/providers/twitter"
export const { handlers, auth } = NextAuth({
providers: [GitHub],
providers: [GitHub, Auth0, Facebook, Google, Twitter],
callbacks: {
async authorized({ request, auth }) {
// if (request.method === "POST") {