Welcome to the Kinde community

W
Woet
Offline, last seen last week
Joined September 23, 2024
I've been creating new organisations, which was working as expected, but with the latest organisations, my support user is running into issues with the Kinde SDK after logging into such an organisation, even though I haven't made any changes compared to what was previously working.

While this is still working correctly for previous organisations, it's blocking me from onboarding new customers at the moment so quite severe for my side and I hope somebody can help me figure out what might be going wrong.
28 comments
W
B
Hi

I'm trying to setup a custom email sender with resend, using the settings they mention in their docs: https://resend.com/docs/send-with-auth0-smtp

However, when I try to send a "test email" the spinner keeps running infinitely, so not receiving an explicit error message either.

How could I further debug this issue?
4 comments
W
B
In my current project I have added all the pages that need to be protected in the (firm) directory.

Is it safe to perform the isAuthenticated check within the layout for all these pages?

My use of the middleware would be a little more complicated, since I'm already adding a CSP configuration there that needs to be applied to both protected and non-protected pages. So if this would also be a safe option, it would make it a lot more simple for me, but I'm not sure if I'm overlooking some security implications here.

Plain Text
import SideBar from "@/features/navigation/components/Sidebar";
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";
import { redirect } from "next/navigation";

import getCurrentUser from "@/features/authentication/data/getCurrentUser";

export default async function FirmLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const { isAuthenticated, getPermission } = getKindeServerSession();
  const loggedIn = await isAuthenticated();
  const adminRead = (await getPermission("admin:read"))?.isGranted ?? false;

  if (!loggedIn) {
    redirect("/api/auth/login");
  }

  const { data } = await getCurrentUser();
  const { user } = data ?? {};

  return (
    <>
      <SideBar user={user} adminRead={adminRead}></SideBar>
      <main className="lg:pl-72">
        <div className="container mx-auto px-4 sm:px-6 lg:px-8">{children}</div>
      </main>
    </>
  );
}
2 comments
W
A
I'm looking on implementing multitenancy with NextJS and KindeAuth. While it's great that Kinde supports this with organisations, it would be very helpful on a best practice approach on how to handle this. More particularly, on how to handle this in the middleware and properly protecting the routes. Loving the product btw!
9 comments
A
W