You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import NextAuth, { NextAuthOptions } from 'next-auth';
import TwitchProvider from 'next-auth/providers/twitch';
import GithubProvider from 'next-auth/providers/github';
import { PrismaAdapter } from '@next-auth/prisma-adapter';
import { prisma } from '../../../lib/prisma';
export const authOptions: NextAuthOptions = {
providers: [
TwitchProvider({
clientId: process.env.NEXT_PUBLIC_TWITCH_ID as string,
clientSecret: process.env.NEXT_PUBLIC_TWITCH_SECRET as string,
}),
GithubProvider({
clientId: process.env.NEXT_PUBLIC_GITHUB_ID as string,
clientSecret: process.env.NEXT_PUBLIC_GITHUB_SECRET as string
}),
],
adapter: PrismaAdapter(prisma),
}
export default NextAuth(authOptions);
So I found this issue and downloaded the experimental version and the redirects stopped but pages that unauthenticated users cannot access, they can access.
Matcher its not working??
Contributing 馃檶馃徑
No, I am afraid I cannot help regarding this
The text was updated successfully, but these errors were encountered:
Your middleware and NextAuth config should have the same custom pages config, otherwise NextAuth.js doesn't know where to redirect in your middleware. We are adding a better warning/detection for this in #5000
Your middleware and NextAuth config should have the same custom pages config, otherwise NextAuth.js doesn't know where to redirect in your middleware. We are adding a better warning/detection for this in #5000
still not working here.
everything seems to work normally without the prisma adapter.
I downloaded the example given from the next-auth website and added the prisma adapter and it didn't work properly either.
Could you download the template and put the prisma adapter and see if the middleware works?
Question 馃挰
After adding the Prisma Adapter in the application for a test, the system started to suffer with redirects: "too many redirects in the browser".
How to reproduce 鈽曪笍
Code in index.tsx(login page):
middleware:
authOptions:
So I found this issue and downloaded the experimental version and the redirects stopped but pages that unauthenticated users cannot access, they can access.
Matcher its not working??
Contributing 馃檶馃徑
No, I am afraid I cannot help regarding this
The text was updated successfully, but these errors were encountered: