mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
add more providers
This commit is contained in:
@@ -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") {
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user