Implement multi tenancy

This commit is contained in:
Sara
2023-10-27 11:26:00 +02:00
committed by Mathieu Virbel
parent 6bd5247bab
commit 4a69bffc9c
37 changed files with 409 additions and 236 deletions

View File

@@ -0,0 +1,10 @@
import { NextApiRequest } from "next";
import { fief, getFiefAuth } from "../../lib/fief";
// type FiefNextApiHandler<T> = (req: NextApiRequest & AuthenticateRequestResult, res: NextApiResponse<T>) => unknown | Promise<unknown>;
export default (req: any, res) => {
const domain = req.url;
console.log("user", req.url, getFiefAuth("localhost").currentUser());
return getFiefAuth("localhost").currentUser()(req, res);
};
// export default fief.currentUser()