middleware removal
This commit is contained in:
@@ -1,37 +0,0 @@
|
|||||||
// export { default } from "next-auth/middleware";
|
|
||||||
|
|
||||||
// export const config = {
|
|
||||||
// matcher: ["/myportal/", "/myportal/:path*"],
|
|
||||||
// };
|
|
||||||
|
|
||||||
// import { withAuth } from 'next-auth/middleware';
|
|
||||||
|
|
||||||
// export default withAuth({
|
|
||||||
// pages: {
|
|
||||||
// signIn: '/login',
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
|
|
||||||
import { withAuth } from "next-auth/middleware";
|
|
||||||
|
|
||||||
export default withAuth({
|
|
||||||
callbacks: {
|
|
||||||
authorized: ({ req }) => {
|
|
||||||
// verify token and return a boolean
|
|
||||||
const sessionToken = req.cookies.get("next-auth.session-token");
|
|
||||||
if (sessionToken) return true;
|
|
||||||
else return false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const config = {
|
|
||||||
matcher: [
|
|
||||||
"/myportal",
|
|
||||||
"/myportal/:path*",
|
|
||||||
"/newappeal",
|
|
||||||
"/newappeal/:path*",
|
|
||||||
"/account",
|
|
||||||
"/account/:path*",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// export { default } from "next-auth/middleware";
|
||||||
|
|
||||||
|
// export const config = {
|
||||||
|
// matcher: ["/myportal/", "/myportal/:path*"],
|
||||||
|
// };
|
||||||
|
|
||||||
|
// import { withAuth } from 'next-auth/middleware';
|
||||||
|
|
||||||
|
// export default withAuth({
|
||||||
|
// pages: {
|
||||||
|
// signIn: '/login',
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// import { withAuth } from "next-auth/middleware";
|
||||||
|
|
||||||
|
// export default withAuth({
|
||||||
|
// callbacks: {
|
||||||
|
// authorized: ({ req }) => {
|
||||||
|
// // verify token and return a boolean
|
||||||
|
// const sessionToken = req.cookies.get("next-auth.session-token");
|
||||||
|
// if (sessionToken) return true;
|
||||||
|
// else return false;
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// export const config = {
|
||||||
|
// matcher: [
|
||||||
|
// "/myportal",
|
||||||
|
// "/myportal/:path*",
|
||||||
|
// "/newappeal",
|
||||||
|
// "/newappeal/:path*",
|
||||||
|
// "/account",
|
||||||
|
// "/account/:path*",
|
||||||
|
// ],
|
||||||
|
// };
|
||||||
Reference in New Issue
Block a user