Update Bridge file layout
This commit is contained in:
parent
2c43e81436
commit
b0fb643b6a
47 changed files with 2488 additions and 2087 deletions
24
apps/bridge-frontend/middleware.ts
Normal file
24
apps/bridge-frontend/middleware.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { withAuth } from "next-auth/middleware";
|
||||
|
||||
export default withAuth({
|
||||
pages: {
|
||||
signIn: `/login`,
|
||||
},
|
||||
callbacks: {
|
||||
authorized: ({ token }) => {
|
||||
if (process.env.SETUP_MODE === "true") {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (token?.email) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const config = {
|
||||
matcher: ["/((?!ws|wss|api|_next/static|_next/image|favicon.ico).*)"],
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue