Furkan Özay
Furkan Özay
Explore posts from servers
BABetter Auth
Created by Furkan Özay on 4/12/2025 in #help
Redirect Problem
hello again, I am struggling with another interesting problem. I am using Next 15.3.0 and my middleware.ts file is as follows
export async function middleware(request: NextRequest) {
const { data: session } = await betterFetch("/api/auth/get-session", {
baseURL:
process.env.NODE_ENV === "production"
? process.env.NEXT_PUBLIC_BASE_URL
: request.nextUrl.origin,
headers: {
cookie: request.headers.get("cookie") || "",
},
});
const { nextUrl } = request;
const { pathname } = nextUrl;
if (session && guestPaths.includes(pathname)) {
return NextResponse.redirect(new URL("/", request.url));
}
if (!session && protectedPaths.some((path) => pathname.startsWith(path))) {
return NextResponse.redirect(
new URL(`/hesap/giris?next=${pathname}`, request.url)
);
}
return NextResponse.next();
}

export const config = {
matcher: [
"/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
],
};
export async function middleware(request: NextRequest) {
const { data: session } = await betterFetch("/api/auth/get-session", {
baseURL:
process.env.NODE_ENV === "production"
? process.env.NEXT_PUBLIC_BASE_URL
: request.nextUrl.origin,
headers: {
cookie: request.headers.get("cookie") || "",
},
});
const { nextUrl } = request;
const { pathname } = nextUrl;
if (session && guestPaths.includes(pathname)) {
return NextResponse.redirect(new URL("/", request.url));
}
if (!session && protectedPaths.some((path) => pathname.startsWith(path))) {
return NextResponse.redirect(
new URL(`/hesap/giris?next=${pathname}`, request.url)
);
}
return NextResponse.next();
}

export const config = {
matcher: [
"/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)",
],
};
If the user quickly changes pages in a row or performs a repetitive action, they are suddenly redirected to the homepage, but no buttons or functions work after the redirection @Ping I will ask for your support in this matter 🙏
8 replies
BABetter Auth
Created by Furkan Özay on 4/8/2025 in #help
After successive transactions, it throws you to the login page
It is very interesting, I think it is related to the rate-limit. When I try to make a transaction in a row, I am redirected to the login page, but since the user has a session, the login page does not work properly, and when I return to the homepage, I appear to be logged in.
2 replies
BABetter Auth
Created by Furkan Özay on 3/25/2025 in #help
JWKS Error
No description
15 replies
BABetter Auth
Created by Furkan Özay on 3/23/2025 in #help
onApiError custom error page
No description
31 replies
BABetter Auth
Created by Furkan Özay on 3/21/2025 in #help
Kinde to Better-Auth
Hello, since the development of this library has impressed me a lot, I want to switch to it, but there is such a problem. In the integration I established with kinde auth before, user ids were kept as autoincrement int in my own database, how can I transfer the data here now?
85 replies
KKinde
Created by Furkan Özay on 3/21/2025 in #💻┃support
Self-serve profile management
When I look at the Roadmap page, I see that the feature titled “Allow self-serve profile management” is in the now tab, how do we use it?
2 replies
KKinde
Created by Furkan Özay on 1/10/2025 in #💻┃support
Typeform - Kinde integration
We will receive pre-application with typeform and the data entered in typeform should be taken and user registration should be made in kindede, but a profile should also be created in the local db. Does anyone have any idea how this can happen?
6 replies
KKinde
Created by Furkan Özay on 1/8/2025 in #💻┃support
NextJS SDK Active Sessions
Is there any chance to list the user's active sessions with Kinde NextJS SDK? Such a topic was opened before but left unfinished :/ https://community.kinde.com/is-there-a-way-to-get-the-active-sessions-of-a-user-7XdMgd8m0KCG
2 replies
BABetter Auth
Created by Furkan Özay on 1/5/2025 in #help
Roles And Permissions
I want to do something like roles and permissions, both roles will have permissions and users will have custom permissions and I want to make them manageable, for example, from a user page, the administrator can add or remove permissions for the user and do the same for the role. is such a thing possible? I use deepl translate sorry any typos
8 replies