WiESA
WiESA
Explore posts from servers
KKinde
Created by WiESA on 8/19/2024 in #💻┃support
Can't remove team members
Thanks for the quick fix! Just tried it out
10 replies
KKinde
Created by WiESA on 8/19/2024 in #💻┃support
Can't remove team members
I'm the Owner role. Thanks I'll lookout here for a fix
10 replies
KKinde
Created by WiESA on 7/3/2024 in #💻┃support
Refreshing token not working on Safari (iPhone)
Thanks but this issue was just about keeping the session alive on an iphone. Not moving inbetween. Scenario: User logs in then 25h later they visit the app and they have to login again. I want them to skip the login in this scenario
5 replies
KKinde
Created by WiESA on 4/24/2024 in #💻┃support
Chaining Middlewares Next.JS Kinde + next-international
@Jan I implemented it similar to you
import { withAuth } from "@kinde-oss/kinde-auth-nextjs/middleware";
import { type NextRequest } from "next/server";
import createMiddleware from "next-intl/middleware";

const intlMiddleware = createMiddleware({
locales: ["en", "de"],
defaultLocale: "de",
});

const excluded = [
"/api/auth/login",
"/api/auth/logout",
"/api/auth/kinde_callback",
"/api/kindeSession",
];

export default withAuth(async function middleware(req: NextRequest) {
if (excluded.includes(req.nextUrl.pathname)) {
return req;
}

return intlMiddleware(req);
});

export const config = {
matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"],
};
import { withAuth } from "@kinde-oss/kinde-auth-nextjs/middleware";
import { type NextRequest } from "next/server";
import createMiddleware from "next-intl/middleware";

const intlMiddleware = createMiddleware({
locales: ["en", "de"],
defaultLocale: "de",
});

const excluded = [
"/api/auth/login",
"/api/auth/logout",
"/api/auth/kinde_callback",
"/api/kindeSession",
];

export default withAuth(async function middleware(req: NextRequest) {
if (excluded.includes(req.nextUrl.pathname)) {
return req;
}

return intlMiddleware(req);
});

export const config = {
matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"],
};
8 replies
KKinde
Created by WiESA on 4/24/2024 in #💻┃support
Chaining Middlewares Next.JS Kinde + next-international
Great, thank you for the answer!
8 replies
KKinde
Created by WiESA on 4/24/2024 in #💻┃support
Chaining Middlewares Next.JS Kinde + next-international
Hi @Jan no not yet, had to remove the translation for now. Did you have the same issue?
8 replies
KKinde
Created by WiESA on 5/3/2024 in #💻┃support
Token expired issues
Hi, can I give any more information to help you find the issue?
4 replies
KKinde
Created by WiESA on 5/3/2024 in #💻┃support
Token expired issues
Yes for now everytime while developing locally. I'm doing this check in a Layout component, and when the token is expired it's still giving me isAuthenticated = true const { isAuthenticated } = getKindeServerSession(); if (!(await isAuthenticated())) { redirect("/api/auth/login"); }
4 replies
KKinde
Created by WiESA on 4/24/2024 in #💻┃support
Chaining Middlewares Next.JS Kinde + next-international
Thank you so much for the answer, I will try this out and get back to you
8 replies
DTDrizzle Team
Created by WiESA on 3/25/2024 in #help
Running drizzle-kit push:sqlite with Turso
So it seems like drizzle did not generate correct sql (from my knowledge). I ended up writing this to insert data only into the columns that existed before
ALTER TABLE `isak.dev_burger` RENAME TO `isak.dev_burger_old`;--> statement-breakpoint

CREATE TABLE `isak.dev_burger` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`resturant_name` text(256),
`created_at` integer DEFAULT CURRENT_TIMESTAMP,
`updatedAt` integer,
`rating` integer,
`description` text,
`city` text,
`country` text(256),
`tested_food` text,
`images` text,
`address` text DEFAULT 'empty address'
);--> statement-breakpoint

INSERT INTO `isak.dev_burger` (id,
resturant_name,
created_at,
updatedAt,
rating,
description,
city,
country,
tested_food,
images)
SELECT * FROM `isak.dev_burger_old`;--> statement-breakpoint

DROP TABLE `isak.dev_burger_old`;--> statement-breakpoint
ALTER TABLE `isak.dev_burger` RENAME TO `isak.dev_burger_old`;--> statement-breakpoint

CREATE TABLE `isak.dev_burger` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`resturant_name` text(256),
`created_at` integer DEFAULT CURRENT_TIMESTAMP,
`updatedAt` integer,
`rating` integer,
`description` text,
`city` text,
`country` text(256),
`tested_food` text,
`images` text,
`address` text DEFAULT 'empty address'
);--> statement-breakpoint

INSERT INTO `isak.dev_burger` (id,
resturant_name,
created_at,
updatedAt,
rating,
description,
city,
country,
tested_food,
images)
SELECT * FROM `isak.dev_burger_old`;--> statement-breakpoint

DROP TABLE `isak.dev_burger_old`;--> statement-breakpoint
3 replies